From eaa4473dbd4ad404b85f8f0f63b0418a782351b4 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Mon, 17 Aug 2015 14:01:41 +0200 Subject: core, core/types: readd transactions after chain re-org Added a `Difference` method to `types.Transactions` which sets the receiver to the difference of a to b (NOTE: not a **and** b). Transaction pool subscribes to RemovedTransactionEvent adding back to those potential missing from the chain. When a chain re-org occurs remove any transactions that were removed from the canonical chain during the re-org as well as the receipts that were generated in the process. Closes #1746 --- eth/helper_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eth') diff --git a/eth/helper_test.go b/eth/helper_test.go index 3a799e6f6..034751f7f 100644 --- a/eth/helper_test.go +++ b/eth/helper_test.go @@ -33,7 +33,7 @@ func newTestProtocolManager(blocks int, generator func(int, *core.BlockGen), new evmux = new(event.TypeMux) pow = new(core.FakePow) db, _ = ethdb.NewMemDatabase() - genesis = core.WriteGenesisBlockForTesting(db, testBankAddress, testBankFunds) + genesis = core.WriteGenesisBlockForTesting(db, core.GenesisAccount{testBankAddress, testBankFunds}) chainman, _ = core.NewChainManager(db, pow, evmux) blockproc = core.NewBlockProcessor(db, pow, chainman, evmux) ) -- cgit v1.2.3