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 --- common/natspec/natspec_e2e_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/natspec/natspec_e2e_test.go') diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index ea28b457e..57f81f652 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -134,7 +134,7 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { db, _ := ethdb.NewMemDatabase() // set up mock genesis with balance on the testAddress - core.WriteGenesisBlockForTesting(db, common.HexToAddress(testAddress), common.String2Big(testBalance)) + core.WriteGenesisBlockForTesting(db, core.GenesisAccount{common.HexToAddress(testAddress), common.String2Big(testBalance)}) // only use minimalistic stack with no networking ethereum, err = eth.New(ð.Config{ -- cgit v1.2.3