mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 12:49:23 +00:00
Write a test runner for Monero transactions
Also includes a few fixes for the library itself. Supersedes #172.
This commit is contained in:
@@ -27,7 +27,7 @@ pub struct JsonRpcResponse<T> {
|
||||
#[derive(Deserialize, Debug)]
|
||||
struct TransactionResponse {
|
||||
tx_hash: String,
|
||||
block_height: usize,
|
||||
block_height: Option<usize>,
|
||||
as_hex: String,
|
||||
pruned_as_hex: String,
|
||||
}
|
||||
@@ -274,7 +274,7 @@ impl Rpc {
|
||||
self.get_transactions(&[tx]).await.map(|mut txs| txs.swap_remove(0))
|
||||
}
|
||||
|
||||
pub async fn get_transaction_block_number(&self, tx: &[u8]) -> Result<usize, RpcError> {
|
||||
pub async fn get_transaction_block_number(&self, tx: &[u8]) -> Result<Option<usize>, RpcError> {
|
||||
let txs: TransactionsResponse =
|
||||
self.rpc_call("get_transactions", Some(json!({ "txs_hashes": [hex::encode(tx)] }))).await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user