Skip to content

Commit e2d9b16

Browse files
committed
fix(json_rpc): computing confirmations in getTransaction
1 parent 354a962 commit e2d9b16

File tree

1 file changed

+1
-1
lines changed
  • node/src/actors/json_rpc

1 file changed

+1
-1
lines changed

node/src/actors/json_rpc/api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ pub async fn get_transaction(hash: Result<(Hash,), Error>) -> JsonRpcResult {
11291129
block_epoch: Some(block_epoch),
11301130
block_timestamp: Some(block_timestamp),
11311131
confirmed,
1132-
confirmations: Some(current_epoch.saturating_sub(block_epoch)),
1132+
confirmations: Some(current_epoch.saturating_sub(block_epoch + 1)),
11331133
};
11341134
let value = match serde_json::to_value(output) {
11351135
Ok(x) => x,

0 commit comments

Comments
 (0)