mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
StateDB ZKInputs generation compatible with circom
- Add SignatureConstant to L1Tx.TxCompressedData
- ZKInputs generation works initial version working and compatible with circom Hermez circuit
- Lots of small updates for circuits compatibility
- Update version (with new changes) of `go-iden3-crypto` & `go-merkletree`
This commit is contained in:
@@ -3,11 +3,21 @@ package common
|
||||
import (
|
||||
"database/sql"
|
||||
"database/sql/driver"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSignatureConstant(t *testing.T) {
|
||||
signatureConstant := uint32(3322668559)
|
||||
var signatureConstantBytes [4]byte
|
||||
binary.BigEndian.PutUint32(signatureConstantBytes[:], signatureConstant)
|
||||
assert.Equal(t, SignatureConstantBytes, signatureConstantBytes[:])
|
||||
assert.Equal(t, "c60be60f", hex.EncodeToString(SignatureConstantBytes))
|
||||
}
|
||||
|
||||
func TestTxIDScannerValue(t *testing.T) {
|
||||
txid0 := &TxID{}
|
||||
txid1 := &TxID{}
|
||||
|
||||
Reference in New Issue
Block a user