diff options
author | Determinant <[email protected]> | 2019-08-15 14:50:39 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-08-15 14:50:39 -0400 |
commit | 669168d32a534c1054f9df659b3199f7b6da0d21 (patch) | |
tree | 5cc6fc7fa2174473d298cababb5d573640ebe977 /consensus/dummy | |
parent | 49b07487092947a8b54d39ce4fbdc94e33537993 (diff) |
show wallet state in the example
Diffstat (limited to 'consensus/dummy')
-rw-r--r-- | consensus/dummy/consensus.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/consensus/dummy/consensus.go b/consensus/dummy/consensus.go index 9f3791a..7700a55 100644 --- a/consensus/dummy/consensus.go +++ b/consensus/dummy/consensus.go @@ -18,11 +18,15 @@ import ( "github.com/ethereum/go-ethereum/rpc" ) +type OnFinalizeCallbackType = func(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header) +type OnFinalizeAndAssembleCallbackType = func(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) +type OnAPIsCallbackType = func(consensus.ChainReader) []rpc.API + type ConsensusCallbacks struct { OnSeal func(*types.Block) error - OnAPIs func(consensus.ChainReader) []rpc.API - OnFinalize func(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header) - OnFinalizeAndAssemble func(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) + OnAPIs OnAPIsCallbackType + OnFinalize OnFinalizeCallbackType + OnFinalizeAndAssemble OnFinalizeAndAssembleCallbackType } type DummyEngine struct { |