Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion node/api/transactionpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ type (
TpoolTxnsGET struct {
Transactions []types.Transaction `json:"transactions"`
}

// TpoolRawPOST reply with transaction ID
TpoolRawPOST struct {
ID types.TransactionID `json:"id"`
}
)

// RegisterRoutesTransactionPool is a helper function to register all
Expand Down Expand Up @@ -139,7 +144,10 @@ func tpoolRawHandlerPOST(tpool modules.TransactionPool, w http.ResponseWriter, r
WriteError(w, Error{"error accepting transaction set: " + err.Error()}, http.StatusBadRequest)
return
}
WriteSuccess(w)

WriteJSON(w, TpoolRawPOST{
ID: txn.ID(),
})
}

// tpoolConfirmedGET returns whether the specified transaction has
Expand Down