Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

fix(indexer): r & s in rlp encode should be integer rather than bytes #458

Merged
merged 1 commit into from
Jul 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions crates/indexer/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,14 @@ impl Transaction {
s.append(&vec![0u8; 0]);
}
};
// r & s should be integer format in RLP
let r_num = U256::from(&self.r);
let s_num = U256::from(&self.s);
s.append(&self.value)
.append(&self.data)
.append(&self.add_chain_replay_protection())
.append(&self.r.to_vec())
.append(&self.s.to_vec());
.append(&r_num)
.append(&s_num);
s.finalize_unbounded_list();
s.out().freeze().to_vec()
}
Expand Down