fix(rpc/otterscan): set fullblock.tx_count with block's (#10421)

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
Delweng
2024-08-21 22:40:13 +08:00
committed by GitHub
parent 1f6993d770
commit 5a522c81fb

View File

@ -233,7 +233,11 @@ where
OtsTransactionReceipt { receipt, timestamp }
})
.collect();
Ok(OtsBlockTransactions { fullblock: block.inner.into(), receipts })
// use `transaction_count` to indicate the paginate information
let mut block = OtsBlockTransactions { fullblock: block.inner.into(), receipts };
block.fullblock.transaction_count = tx_len;
Ok(block)
}
/// Handler for `searchTransactionsBefore`