mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-02 01:53:48 +00:00
chore(consensus): change SetHeadL1Origin && UpdateL1Origin to taikoauth_ namespace (#386)
* move the update api to taiko auth namespace * fix lint
This commit is contained in:
parent
a3e2b34b48
commit
838f653153
1 changed files with 12 additions and 12 deletions
|
|
@ -60,18 +60,6 @@ func (s *TaikoAPIBackend) L1OriginByID(blockID *math.HexOrDecimal256) (*rawdb.L1
|
|||
return l1Origin, nil
|
||||
}
|
||||
|
||||
// SetHeadL1Origin sets the latest L2 block's corresponding L1 origin.
|
||||
func (s *TaikoAPIBackend) SetHeadL1Origin(blockID *math.HexOrDecimal256) *big.Int {
|
||||
rawdb.WriteHeadL1Origin(s.eth.ChainDb(), (*big.Int)(blockID))
|
||||
return (*big.Int)(blockID)
|
||||
}
|
||||
|
||||
// UpdateL1Origin updates the L2 block's corresponding L1 origin.
|
||||
func (s *TaikoAPIBackend) UpdateL1Origin(l1Origin *rawdb.L1Origin) *rawdb.L1Origin {
|
||||
rawdb.WriteL1Origin(s.eth.ChainDb(), l1Origin.BlockID, l1Origin)
|
||||
return l1Origin
|
||||
}
|
||||
|
||||
// GetSyncMode returns the node sync mode.
|
||||
func (s *TaikoAPIBackend) GetSyncMode() (string, error) {
|
||||
return s.eth.config.SyncMode.String(), nil
|
||||
|
|
@ -87,6 +75,18 @@ func NewTaikoAuthAPIBackend(eth *Ethereum) *TaikoAuthAPIBackend {
|
|||
return &TaikoAuthAPIBackend{eth}
|
||||
}
|
||||
|
||||
// SetHeadL1Origin sets the latest L2 block's corresponding L1 origin.
|
||||
func (a *TaikoAuthAPIBackend) SetHeadL1Origin(blockID *math.HexOrDecimal256) *big.Int {
|
||||
rawdb.WriteHeadL1Origin(a.eth.ChainDb(), (*big.Int)(blockID))
|
||||
return (*big.Int)(blockID)
|
||||
}
|
||||
|
||||
// UpdateL1Origin updates the L2 block's corresponding L1 origin.
|
||||
func (a *TaikoAuthAPIBackend) UpdateL1Origin(l1Origin *rawdb.L1Origin) *rawdb.L1Origin {
|
||||
rawdb.WriteL1Origin(a.eth.ChainDb(), l1Origin.BlockID, l1Origin)
|
||||
return l1Origin
|
||||
}
|
||||
|
||||
// TxPoolContent retrieves the transaction pool content with the given upper limits.
|
||||
func (a *TaikoAuthAPIBackend) TxPoolContent(
|
||||
beneficiary common.Address,
|
||||
|
|
|
|||
Loading…
Reference in a new issue