Skip to content

Commit 7864bcd

Browse files
committed
Destruct TransactionView to get wtx_hash
1 parent d49cd4e commit 7864bcd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tx-pool/src/process.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,6 @@ impl TxPoolService {
696696
declared_cycles: Option<Cycle>,
697697
command_rx: Option<&mut watch::Receiver<ChunkCommand>>,
698698
) -> Option<(Result<Completed, Reject>, Arc<Snapshot>)> {
699-
let wtx_hash = tx.witness_hash();
700699
let instant = Instant::now();
701700
let is_sync_process = command_rx.is_none();
702701

@@ -751,6 +750,10 @@ impl TxPoolService {
751750

752751
if verify_cache.is_none() {
753752
// update cache
753+
let TransactionView {
754+
witness_hash: wtx_hash,
755+
..
756+
} = tx;
754757
let txs_verify_cache = Arc::clone(&self.txs_verify_cache);
755758
tokio::spawn(async move {
756759
let mut guard = txs_verify_cache.write().await;

0 commit comments

Comments
 (0)