Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change(rpc): add submitblock RPC method #5526

Merged
merged 20 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d7f6798
adds submitblock rpc method
arya2 Nov 1, 2022
fc5e77a
re-orders imports
arya2 Nov 1, 2022
2cf2f45
replaces thread::yield_now with async yield_now
arya2 Nov 1, 2022
02f0613
Fix doc warnings and unused variable warnings, add missing docs
teor2345 Nov 2, 2022
894c482
Mark work_id as optional
teor2345 Nov 2, 2022
136eae9
Use the same ChainVerifier for downloaded and submitted blocks
teor2345 Nov 2, 2022
7ea79d7
Revert unused changes & minor cleanups
teor2345 Nov 2, 2022
d04ad71
Document currently-unreachable code
teor2345 Nov 2, 2022
2160fbb
updates tests and submit_block response for AlreadyVerified error
arya2 Nov 2, 2022
daffc8f
Update zebra-rpc/src/methods/get_block_template_rpcs.rs
arya2 Nov 2, 2022
6595f07
changes names from BlockVerifier to ChainVerifier and block_verifier …
arya2 Nov 2, 2022
3635525
move how to run the submit_block test example to acceptance.rs
arya2 Nov 2, 2022
e9e7a82
updates snapshot tests
arya2 Nov 2, 2022
6b68c07
moved acceptance test to a separate file
arya2 Nov 3, 2022
0267fb4
removes extra tower::ServiceBuilder::new(), updates docs
arya2 Nov 3, 2022
2640b3d
updates vectors and snapshot tests, changes hex decoding error in sub…
arya2 Nov 3, 2022
dd181c1
hides errors module in zebra-rpc behind a feature flag and adds docs.
arya2 Nov 3, 2022
cf4e937
Updates snapshot test, adds mod docs, moves HexData to its own mod, a…
arya2 Nov 3, 2022
4959a78
update submit block acceptance test mod doc
arya2 Nov 3, 2022
2ebe202
Merge branch 'main' into submitblock
mergify[bot] Nov 4, 2022
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
4 changes: 4 additions & 0 deletions zebra-rpc/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use jsonrpc_core::types::error::{Error, ErrorCode};
teor2345 marked this conversation as resolved.
Show resolved Hide resolved

/// Returns a jsonrpc_core [`Error`] with an [`ErrorCode::ServerError(0)`]
/// with the provided message.
// TODO: Remove the feature flag and replace repetitive closures passed to `map_err`
// in rpc methods.
pub(crate) fn make_server_error(message: impl std::fmt::Display) -> Error {
teor2345 marked this conversation as resolved.
Show resolved Hide resolved
Error {
code: ErrorCode::ServerError(0),
Expand Down
1 change: 1 addition & 0 deletions zebra-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#![doc(html_root_url = "https://doc.zebra.zfnd.org/zebra_rpc")]

pub mod config;
#[cfg(feature = "getblocktemplate-rpcs")]
mod errors;
pub mod methods;
pub mod queue;
Expand Down