mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Add usefull methods for reorg
This commit is contained in:
@@ -4,9 +4,9 @@ import (
|
||||
"math/big"
|
||||
)
|
||||
|
||||
type ExitTreeLeaf struct {
|
||||
type ExitInfo struct {
|
||||
AccountIdx Idx
|
||||
MerkleProof []byte
|
||||
Amount *big.Int
|
||||
Balance *big.Int
|
||||
Nullifier *big.Int
|
||||
}
|
||||
|
||||
@@ -22,8 +22,7 @@ type L1Tx struct {
|
||||
Amount *big.Int `meddler:"amount,bigint"`
|
||||
LoadAmount *big.Int `meddler:"load_amount,bigint"`
|
||||
EthBlockNum uint64 `meddler:"eth_block_num"` // Ethereum Block Number in which this L1Tx was added to the queue
|
||||
// Extra metadata, may be uninitialized
|
||||
Type TxType `meddler:"-"` // optional, descrives which kind of tx it's
|
||||
Type TxType `meddler:"tx_type"`
|
||||
}
|
||||
|
||||
func (tx *L1Tx) Tx() *Tx {
|
||||
|
||||
@@ -15,8 +15,7 @@ type L2Tx struct {
|
||||
Amount *big.Int `meddler:"amount,bigint"`
|
||||
Fee FeeSelector `meddler:"fee"`
|
||||
Nonce Nonce `meddler:"nonce"`
|
||||
// Extra metadata, may be uninitialized
|
||||
Type TxType `meddler:"-"` // optional, descrives which kind of tx it's
|
||||
Type TxType `meddler:"tx_type"`
|
||||
}
|
||||
|
||||
func (tx *L2Tx) Tx() *Tx {
|
||||
|
||||
@@ -62,8 +62,8 @@ type PoolL2Tx struct {
|
||||
RqNonce uint64 `meddler:"rq_nonce,zeroisnull"` // effective 48 bits used
|
||||
AbsoluteFee float64 `meddler:"absolute_fee,zeroisnull"`
|
||||
AbsoluteFeeUpdate time.Time `meddler:"absolute_fee_update,utctimez"`
|
||||
Type TxType `meddler:"tx_type"`
|
||||
// Extra metadata, may be uninitialized
|
||||
Type TxType `meddler:"-"` // optional, descrives which kind of tx it's
|
||||
RqTxCompressedData []byte `meddler:"-"` // 253 bits, optional for atomic txs
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user