Skip to content

Commit

Permalink
Reject TXs sent via RPC with no signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
t-nelson committed Jul 30, 2020
1 parent 9778fed commit a888f2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,9 @@ fn _send_transaction(
wire_transaction: Vec<u8>,
last_valid_slot: Slot,
) -> Result<String> {
if transaction.signatures.is_empty() {
return Err(RpcCustomError::SendTransactionIsNotSigned.into());
}
let signature = transaction.signatures[0];
let transaction_info = TransactionInfo::new(signature, wire_transaction, last_valid_slot);
meta.transaction_sender
Expand Down

0 comments on commit a888f2f

Please sign in to comment.