mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 19:36:44 +01:00
mv of babyjub.PublicKey to babyjub.PublicKeyComp
Update usage of `*babyjub.PublicKey` to `babyjub.PublicKeyComp` - when the key is not defined, internally is used `babyjub.EmptyBJJComp`, which is a `[32]byte` of zeroes of type `babyjub.PublicKeyComp` - the API continues returning `nil` when the key is not defined
This commit is contained in:
@@ -88,14 +88,12 @@ func (l2db *L2DB) AddTxTest(tx *common.PoolL2Tx) error {
|
||||
insertTx := &PoolL2TxWrite{
|
||||
TxID: tx.TxID,
|
||||
FromIdx: tx.FromIdx,
|
||||
ToBJJ: tx.ToBJJ,
|
||||
TokenID: tx.TokenID,
|
||||
Amount: tx.Amount,
|
||||
Fee: tx.Fee,
|
||||
Nonce: tx.Nonce,
|
||||
State: common.PoolL2TxStatePending,
|
||||
Signature: tx.Signature,
|
||||
RqToBJJ: tx.RqToBJJ,
|
||||
RqAmount: tx.RqAmount,
|
||||
Type: tx.Type,
|
||||
}
|
||||
@@ -118,6 +116,12 @@ func (l2db *L2DB) AddTxTest(tx *common.PoolL2Tx) error {
|
||||
if tx.RqToEthAddr != nilAddr {
|
||||
insertTx.RqToEthAddr = &tx.RqToEthAddr
|
||||
}
|
||||
if tx.ToBJJ != common.EmptyBJJComp {
|
||||
insertTx.ToBJJ = &tx.ToBJJ
|
||||
}
|
||||
if tx.RqToBJJ != common.EmptyBJJComp {
|
||||
insertTx.RqToBJJ = &tx.RqToBJJ
|
||||
}
|
||||
f := new(big.Float).SetInt(tx.Amount)
|
||||
amountF, _ := f.Float64()
|
||||
insertTx.AmountFloat = amountF
|
||||
|
||||
Reference in New Issue
Block a user