From 669168d32a534c1054f9df659b3199f7b6da0d21 Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 15 Aug 2019 14:50:39 -0400 Subject: show wallet state in the example --- consensus/dummy/consensus.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'consensus/dummy') 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 { -- cgit v1.2.3-70-g09d2