Add ability to exit on InBlock and Broadcast status for send_extrinsic #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
send_extrinsic
can now takeXtStatus::InBlock
andXtStatus::Broadcast
as statuses to exit on.Changes
XtStatus::InBlock
andXtStatus::Broadcast
cases tosend_extrinsic
send_extrinsic_and_wait_until...
functions forInBlock
andBroadcast
to the rpc moduleon_extrinsic_msg_until...
functions in the rpc clientparse_status
forInblock
and `BroadcastTesting against a substrate node
InBlock
Modified
example_generic_extrinsic
(ln 51) to:Console output using
RUST_LOG=debug cargo run --example example_generic_extrinsic
:Broadcast
Modified
example_generic_extrinsic
(ln 51) to:Console output using
RUST_LOG=debug cargo run --example example_generic_extrinsic
:This showed that when waiting for broadcast, the broadcast status never appeared, so it just stopped on finalised instead. I think the reason for this is that I was only running a single validator node in my test, so there was nowhere for the node to broadcast the transaction.
Addresses #65