pending / chain event
This commit is contained in:
@ -19,6 +19,10 @@ import (
|
||||
"gopkg.in/fatih/set.v0"
|
||||
)
|
||||
|
||||
type PendingBlockEvent struct {
|
||||
Block *types.Block
|
||||
}
|
||||
|
||||
var statelogger = logger.NewLogger("BLOCK")
|
||||
|
||||
type EthManager interface {
|
||||
@ -154,6 +158,10 @@ done:
|
||||
block.Reward = cumulativeSum
|
||||
block.Header().GasUsed = totalUsedGas
|
||||
|
||||
if transientProcess {
|
||||
go self.eventMux.Post(PendingBlockEvent{block})
|
||||
}
|
||||
|
||||
return receipts, handled, unhandled, erroneous, err
|
||||
}
|
||||
|
||||
|
@ -33,8 +33,9 @@ type Filter struct {
|
||||
max int
|
||||
topics [][]byte
|
||||
|
||||
BlockCallback func(*types.Block)
|
||||
LogsCallback func(state.Logs)
|
||||
BlockCallback func(*types.Block)
|
||||
PendingCallback func(*types.Block)
|
||||
LogsCallback func(state.Logs)
|
||||
}
|
||||
|
||||
// Create a new filter which uses a bloom filter on blocks to figure out whether a particular block
|
||||
|
Reference in New Issue
Block a user