-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
479 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
zebra-rpc/src/methods/get_block_template_rpcs/types/submit_block.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/// Optional argument `jsonparametersobject` for `submitblock` RPC request | ||
/// | ||
/// See notes for [`Rpc::submit_block`] method | ||
#[derive(Debug, serde::Serialize, serde::Deserialize)] | ||
pub struct JsonParameters { | ||
pub(crate) work_id: String, | ||
} | ||
|
||
/// Response to a `submitblock` RPC request | ||
#[derive(Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] | ||
#[serde(rename_all = "kebab-case")] | ||
pub enum Response { | ||
/// Block was already committed to the non-finalized or finalized state | ||
Duplicate, | ||
/// Block was already added to the state queue or channel, but not yet committed to the non-finalized state | ||
DuplicateInconclusive, | ||
/// Block was already committed to the non-finalized state, but not on the best chain | ||
Inconclusive, | ||
/// Block rejected as invalid | ||
Rejected, | ||
/// Block successfully submitted, return null | ||
#[serde(rename = "null")] | ||
Accepted, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.