Skip to content

Commit

Permalink
Fixed key for compute::Result
Browse files Browse the repository at this point in the history
  • Loading branch information
lazovicff committed Nov 7, 2024
1 parent 66b6b9d commit a112857
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common/src/db/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl DbItem for TxEvent {

impl DbItem for Result {
fn get_key(&self) -> Vec<u8> {
self.compute_request_tx_hash().to_bytes()
self.get_seq_number().to_be_bytes().to_vec()
}

fn get_cf() -> String {
Expand Down
5 changes: 5 additions & 0 deletions common/src/tx/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ impl Result {
self.seq_number = Some(seq_number);
}

/// Get sequence number
pub fn get_seq_number(&self) -> u64 {
self.seq_number.unwrap()
}

/// Append verification tx hash
pub fn append_verification_tx_hash(&mut self, tx_hash: TxHash) {
self.compute_verification_tx_hashes.push(tx_hash);
Expand Down

0 comments on commit a112857

Please sign in to comment.