fn blocks() -> ((Vec<u8>, Hash), (Vec<u8>, Hash)) {
		let mut t = new_test_ext(COMPACT_CODE, false);
		let block1 = construct_block(
			&mut t,
			1,
			GENESIS_HASH.into(),
			vec![
				CheckedExtrinsic {
					signed: None,
					function: Call::Timestamp(timestamp::Call::set(42)),
				},
				CheckedExtrinsic {
					signed: Some((alice(), 0)),
					function: Call::Balances(balances::Call::transfer(bob().into(), 69)),
				},
			]
		);
		let block2 = construct_block(
			&mut t,
			2,
			block1.1.clone(),
			vec![
				CheckedExtrinsic {
					signed: None,
					function: Call::Timestamp(timestamp::Call::set(52)),
				},
				CheckedExtrinsic {
					signed: Some((bob(), 0)),
					function: Call::Balances(balances::Call::transfer(alice().into(), 5)),
				},
				CheckedExtrinsic {
					signed: Some((alice(), 1)),
					function: Call::Balances(balances::Call::transfer(bob().into(), 15)),
				}
			]
		);

		let digest = generic::Digest::<Log>::default();
		assert_eq!(Header::decode(&mut &block2.0[..]).unwrap().digest, digest);

		(block1, block2)
	}
// block 1 and 2 must be created together to ensure transactions are only signed once (since they
// are not guaranteed to be deterministic) and to ensure that the correct state is propagated
// from block1's execution to block2 to derive the correct storage_root.
block 1 and 2 must be created together to ensure transactions are only signed once (since they
are not guaranteed to be deterministic) and to ensure that the correct state is propagated
from block1's execution to block2 to derive the correct storage_root.
block 1 and 2 must be created together to ensure transactions are only signed once ( since they are not guaranteed to be deterministic ) and to ensure that the correct state is propagated from block1 ' s execution to block2 to derive the correct storage_root .
fn blocks() -> ((Vec<u8>, Hash), (Vec<u8>, Hash)) {
		let mut t = new_test_ext(COMPACT_CODE, false);
		let block1 = construct_block(
			&mut t,
			1,
			GENESIS_HASH.into(),
			vec![
				CheckedExtrinsic {
					signed: None,
					function: Call::Timestamp(timestamp::Call::set(42)),
				},
				CheckedExtrinsic {
					signed: Some((alice(), 0)),
					function: Call::Balances(balances::Call::transfer(bob().into(), 69)),
				},
			]
		);
		let block2 = construct_block(
			&mut t,
			2,
			block1.1.clone(),
			vec![
				CheckedExtrinsic {
					signed: None,
					function: Call::Timestamp(timestamp::Call::set(52)),
				},
				CheckedExtrinsic {
					signed: Some((bob(), 0)),
					function: Call::Balances(balances::Call::transfer(alice().into(), 5)),
				},
				CheckedExtrinsic {
					signed: Some((alice(), 1)),
					function: Call::Balances(balances::Call::transfer(bob().into(), 15)),
				}
			]
		);
		let digest = generic::Digest::<Log>::default();
		assert_eq!(Header::decode(&mut &block2.0[..]).unwrap().digest, digest);
		(block1, block2)
	}
fn blocks ( ) -> ( ( Vec < u8 > , Hash ) , ( Vec < u8 > , Hash ) ) { let mut t = new_test_ext ( COMPACT_CODE , false ) ; let block1 = construct_block ( & mut t , 1 , GENESIS_HASH . into ( ) , vec ! [ CheckedExtrinsic { signed None function Call Timestamp ( timestamp Call set ( 42 ) ) } CheckedExtrinsic { signed Some ( ( alice ( ) 0 ) ) function Call Balances ( balances Call transfer ( bob ( ) into ( ) 69 ) ) } ] ) ; let block2 = construct_block ( & mut t , 2 , block1 . 1 . clone ( ) , vec ! [ CheckedExtrinsic { signed None function Call Timestamp ( timestamp Call set ( 52 ) ) } CheckedExtrinsic { signed Some ( ( bob ( ) 0 ) ) function Call Balances ( balances Call transfer ( alice ( ) into ( ) 5 ) ) } CheckedExtrinsic { signed Some ( ( alice ( ) 1 ) ) function Call Balances ( balances Call transfer ( bob ( ) into ( ) 15 ) ) } ] ) ; let digest = generic :: Digest :: < Log > :: default ( ) ; assert_eq ! ( Header decode ( mut block2 0 [ ] ) unwrap ( ) digest digest ) ; ( block1 , block2 ) }
block 1 and 2 must be created together to ensure transactions are only signed once (since they
are not guaranteed to be deterministic) and to ensure that the correct state is propagated
from block1's execution to block2 to derive the correct storage_root.
block 1 and 2 must be created together to ensure transactions are only signed once ( since they are not guaranteed to be deterministic ) and to ensure that the correct state is propagated from block1 ' s execution to block2 to derive the correct storage_root .