Add PoolL2Tx verify signature needed methods

Implements the hash to be signed from PoolL2Tx, compatible with javascript version.
Implements the signature verification for a given PoolL2Tx.
This commit is contained in:
arnaucube
2020-08-24 09:41:43 +02:00
parent 869ab519a4
commit 7fa658cc84
4 changed files with 86 additions and 2 deletions

View File

@@ -149,7 +149,7 @@ func genTxs(n int) []*common.PoolL2Tx {
Fee: 99,
Nonce: 28,
State: state,
Signature: *privK.SignPoseidon(big.NewInt(674238462)),
Signature: privK.SignPoseidon(big.NewInt(674238462)),
Timestamp: time.Now().UTC(),
}
if i%2 == 0 { // Optional parameters: rq