mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-06 19:06:42 +01:00
Add forge delay to api get state
This commit is contained in:
@@ -392,6 +392,7 @@ func NewNode(mode Mode, cfg *config.Node) (*Node, error) {
|
||||
ChainID: chainIDU16,
|
||||
HermezAddress: cfg.SmartContracts.Rollup,
|
||||
},
|
||||
cfg.Coordinator.ForgeDelay.Duration,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, tracerr.Wrap(err)
|
||||
@@ -447,6 +448,7 @@ func NewNodeAPI(
|
||||
sdb *statedb.StateDB,
|
||||
l2db *l2db.L2DB,
|
||||
config *api.Config,
|
||||
forgeDelay time.Duration,
|
||||
) (*NodeAPI, error) {
|
||||
engine := gin.Default()
|
||||
engine.NoRoute(handleNoRoute)
|
||||
@@ -457,6 +459,9 @@ func NewNodeAPI(
|
||||
hdb,
|
||||
l2db,
|
||||
config,
|
||||
&api.NodeConfig{
|
||||
ForgeDelay: forgeDelay.Seconds(),
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, tracerr.Wrap(err)
|
||||
|
||||
Reference in New Issue
Block a user