forked from cerc-io/plugeth
bc42e88415
This change improves GenerateChain to support internal chain history access (ChainReader) for the consensus engine and EVM. GenerateChain takes a `parent` block and the number of blocks to create. With my changes, the consensus engine and EVM can now access blocks from `parent` up to the block currently being generated. This is required to make the BLOCKHASH instruction work, and also needed to create real clique chains. Clique uses chain history to figure out if the current signer is in-turn, for example. I've also added some more accessors to BlockGen. These are helpful when creating transactions: - g.Signer returns a signer instance for the current block - g.Difficulty returns the current block difficulty - g.Gas returns the remaining gas amount Another fix in this commit concerns the receipts returned by GenerateChain. The receipts now have properly derived fields (BlockHash, etc.) and should generally match what would be returned by the RPC API. |
||
---|---|---|
.. | ||
catalyst | ||
downloader | ||
ethconfig | ||
fetcher | ||
filters | ||
gasprice | ||
protocols | ||
tracers | ||
api_admin.go | ||
api_backend.go | ||
api_debug_test.go | ||
api_debug.go | ||
api_miner.go | ||
api.go | ||
backend.go | ||
bloombits.go | ||
handler_eth_test.go | ||
handler_eth.go | ||
handler_snap.go | ||
handler_test.go | ||
handler.go | ||
peer.go | ||
peerset.go | ||
state_accessor.go | ||
sync_test.go | ||
sync.go |