pending / chain event

This commit is contained in:
obscuren
2015-02-05 11:55:03 -08:00
parent bcacaaa4f4
commit c64852dbcc
6 changed files with 71 additions and 5 deletions

View File

@@ -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
}