mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 04:37:57 +00:00
Document TransactionStatus and fix termination conditions. (#4446)
* Document TransactionStatus and fix termination conditions. * Update client/rpc-api/src/author/mod.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
Gavin Wood
parent
06e382b0d4
commit
216f77d91f
@@ -84,12 +84,13 @@ impl<H: Clone, H2: Clone> Sender<H, H2> {
|
||||
|
||||
/// Some state change (perhaps another extrinsic was included) rendered this extrinsic invalid.
|
||||
pub fn usurped(&mut self, hash: H) {
|
||||
self.send(TransactionStatus::Usurped(hash))
|
||||
self.send(TransactionStatus::Usurped(hash));
|
||||
self.finalized = true;
|
||||
}
|
||||
|
||||
/// Extrinsic has been finalized in block with given hash.
|
||||
pub fn finalized(&mut self, hash: H2) {
|
||||
self.send(TransactionStatus::Finalized(hash));
|
||||
/// Extrinsic has been included in block with given hash.
|
||||
pub fn in_block(&mut self, hash: H2) {
|
||||
self.send(TransactionStatus::InBlock(hash));
|
||||
self.finalized = true;
|
||||
}
|
||||
|
||||
@@ -103,6 +104,7 @@ impl<H: Clone, H2: Clone> Sender<H, H2> {
|
||||
/// Transaction has been dropped from the pool because of the limit.
|
||||
pub fn dropped(&mut self) {
|
||||
self.send(TransactionStatus::Dropped);
|
||||
self.finalized = true;
|
||||
}
|
||||
|
||||
/// The extrinsic has been broadcast to the given peers.
|
||||
|
||||
Reference in New Issue
Block a user