mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Add circuit configuration to node config
- Remove MaxL1CoordTxs parameter from the TxSelector because this parameter doesn't exist - Use ChainID in l1tx byte encoding - Pass txprocessor configuration to batch builder via an existing parameter
This commit is contained in:
@@ -176,7 +176,7 @@ func (tx L1Tx) Tx() Tx {
|
||||
// [ 16 bits ] chainId // 2 bytes
|
||||
// [ 32 bits ] empty (signatureConstant) // 4 bytes
|
||||
// Total bits compressed data: 241 bits // 31 bytes in *big.Int representation
|
||||
func (tx L1Tx) TxCompressedData() (*big.Int, error) {
|
||||
func (tx L1Tx) TxCompressedData(chainID uint16) (*big.Int, error) {
|
||||
amountFloat16, err := NewFloat16(tx.Amount)
|
||||
if err != nil {
|
||||
return nil, tracerr.Wrap(err)
|
||||
@@ -196,7 +196,7 @@ func (tx L1Tx) TxCompressedData() (*big.Int, error) {
|
||||
return nil, tracerr.Wrap(err)
|
||||
}
|
||||
copy(b[19:25], fromIdxBytes[:])
|
||||
copy(b[25:27], []byte{0, 0}) // TODO this will be generated by the ChainID config parameter
|
||||
binary.BigEndian.PutUint16(b[25:27], chainID)
|
||||
copy(b[27:31], SignatureConstantBytes[:])
|
||||
|
||||
bi := new(big.Int).SetBytes(b[:])
|
||||
|
||||
Reference in New Issue
Block a user