mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
WIP
This commit is contained in:
@@ -376,7 +376,7 @@ func NewNode(mode Mode, cfg *config.Node) (*Node, error) {
|
||||
}
|
||||
var debugAPI *debugapi.DebugAPI
|
||||
if cfg.Debug.APIAddress != "" {
|
||||
debugAPI = debugapi.NewDebugAPI(cfg.Debug.APIAddress, stateDB, sync)
|
||||
debugAPI = debugapi.NewDebugAPI(cfg.Debug.APIAddress, historyDB, stateDB, sync)
|
||||
}
|
||||
priceUpdater, err := priceupdater.NewPriceUpdater(cfg.PriceUpdater.URL,
|
||||
priceupdater.APIType(cfg.PriceUpdater.Type), historyDB)
|
||||
@@ -547,6 +547,9 @@ func (n *Node) syncLoopFn(ctx context.Context, lastBlock *common.Block) (*common
|
||||
WDelayer: blockData.WDelayer.Vars,
|
||||
}
|
||||
n.handleNewBlock(ctx, stats, vars, blockData.Rollup.Batches)
|
||||
if n.debugAPI != nil {
|
||||
n.debugAPI.SyncBlockHook()
|
||||
}
|
||||
return &blockData.Block, time.Duration(0), nil
|
||||
} else {
|
||||
// case: no block
|
||||
|
||||
Reference in New Issue
Block a user