mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Fix ChainID in zkInputs empty TxCmpData
Test TxProcessor zkInputs against a real proof server
This commit is contained in:
@@ -168,6 +168,16 @@ func (tx *PoolL2Tx) TxCompressedData(chainID uint16) (*big.Int, error) {
|
||||
return bi, nil
|
||||
}
|
||||
|
||||
// TxCompressedDataEmpty calculates the TxCompressedData of an empty
|
||||
// transaction
|
||||
func TxCompressedDataEmpty(chainID uint16) *big.Int {
|
||||
var b [31]byte
|
||||
binary.BigEndian.PutUint16(b[25:27], chainID)
|
||||
copy(b[27:31], SignatureConstantBytes[:])
|
||||
bi := new(big.Int).SetBytes(b[:])
|
||||
return bi
|
||||
}
|
||||
|
||||
// TxCompressedDataV2 spec:
|
||||
// [ 1 bits ] toBJJSign // 1 byte
|
||||
// [ 8 bits ] userFee // 1 byte
|
||||
|
||||
Reference in New Issue
Block a user