fix: use correct tx field const (#1735)
This commit is contained in:
parent
924705a2da
commit
7e8a5a2e94
|
@ -7,7 +7,6 @@ use crate::{
|
||||||
utils::keccak256,
|
utils::keccak256,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::types::transaction::BASE_NUM_TX_FIELDS;
|
|
||||||
use rlp::{Decodable, RlpStream};
|
use rlp::{Decodable, RlpStream};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
@ -163,13 +162,13 @@ impl TransactionRequest {
|
||||||
pub fn rlp(&self) -> Bytes {
|
pub fn rlp(&self) -> Bytes {
|
||||||
let mut rlp = RlpStream::new();
|
let mut rlp = RlpStream::new();
|
||||||
if let Some(chain_id) = self.chain_id {
|
if let Some(chain_id) = self.chain_id {
|
||||||
rlp.begin_list(BASE_NUM_TX_FIELDS);
|
rlp.begin_list(NUM_TX_FIELDS);
|
||||||
self.rlp_base(&mut rlp);
|
self.rlp_base(&mut rlp);
|
||||||
rlp.append(&chain_id);
|
rlp.append(&chain_id);
|
||||||
rlp.append(&0u8);
|
rlp.append(&0u8);
|
||||||
rlp.append(&0u8);
|
rlp.append(&0u8);
|
||||||
} else {
|
} else {
|
||||||
rlp.begin_list(BASE_NUM_TX_FIELDS - 3);
|
rlp.begin_list(NUM_TX_FIELDS - 3);
|
||||||
self.rlp_base(&mut rlp);
|
self.rlp_base(&mut rlp);
|
||||||
}
|
}
|
||||||
rlp.out().freeze().into()
|
rlp.out().freeze().into()
|
||||||
|
|
Loading…
Reference in New Issue