Merge pull request #15990 from markya0616/sim_backend_block_hash

accounts/abi, core: add AddTxWithChain in BlockGen for simulation
This commit is contained in:
Martin Holst Swende
2018-03-19 08:29:54 +01:00
committed by GitHub
2 changed files with 15 additions and 3 deletions

View File

@ -307,9 +307,9 @@ func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transa
blocks, _ := core.GenerateChain(b.config, b.blockchain.CurrentBlock(), ethash.NewFaker(), b.database, 1, func(number int, block *core.BlockGen) {
for _, tx := range b.pendingBlock.Transactions() {
block.AddTx(tx)
block.AddTxWithChain(b.blockchain, tx)
}
block.AddTx(tx)
block.AddTxWithChain(b.blockchain, tx)
})
statedb, _ := b.blockchain.State()