Skip to content

Commit

Permalink
#222: Add new request/response to check transaction validity in mempool
Browse files Browse the repository at this point in the history
  • Loading branch information
sgerbino committed Mar 15, 2024
1 parent b23f7ce commit 81fb868
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions koinos/rpc/mempool/mempool_rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,27 @@ message check_account_nonce_response {
bool success = 1;
}

message check_transaction_eligibility_request {
bytes payer = 1 [(btype) = ADDRESS];
bytes payee = 2 [(btype) = ADDRESS];
bytes nonce = 3;
uint64 max_payer_rc = 4 [jstype = JS_STRING];
uint64 rc_limit = 5 [jstype = JS_STRING];

optional bytes block_id = 1000 [(btype) = BLOCK_ID];
}

message check_transaction_eligibility_response {
bool success = 1;
}

message mempool_request {
oneof request {
rpc.reserved_rpc reserved = 1;
check_pending_account_resources_request check_pending_account_resources = 2;
get_pending_transactions_request get_pending_transactions = 3;
check_account_nonce_request check_account_nonce = 4;
check_transaction_eligibility_request check_transaction_eligibility = 5;
}
}

Expand All @@ -60,5 +75,6 @@ message mempool_response {
check_pending_account_resources_response check_pending_account_resources = 3;
get_pending_transactions_response get_pending_transactions = 4;
check_account_nonce_response check_account_nonce = 5;
check_transaction_eligibility_response check_transaction_eligibility = 6;
}
}

0 comments on commit 81fb868

Please sign in to comment.