Add transakcio set type define, add set load [...]

Add transakcio set type definition, add set loading, move transakcio to
package, adapt branch to last master updates (fix compile due new common
types & git conflicts).
Update tests to pass the test, pending to adapt to new Transakcio
interface.
This commit is contained in:
arnaucube
2020-10-09 14:06:51 +02:00
parent b40bccfc00
commit 431df55120
24 changed files with 1429 additions and 1365 deletions

View File

@@ -192,8 +192,12 @@ func (tx *PoolL2Tx) HashToSign() (*big.Int, error) {
if err != nil {
return nil, err
}
rqToBJJY := big.NewInt(0)
if tx.RqToBJJ != nil {
rqToBJJY = tx.RqToBJJ.Y
}
return poseidon.Hash([]*big.Int{toCompressedData, toEthAddr, toBJJAy, rqTxCompressedDataV2, rqToEthAddr, tx.RqToBJJ.Y})
return poseidon.Hash([]*big.Int{toCompressedData, toEthAddr, toBJJAy, rqTxCompressedDataV2, rqToEthAddr, rqToBJJY})
}
// VerifySignature returns true if the signature verification is correct for the given PublicKey