-
Notifications
You must be signed in to change notification settings - Fork 42
tendermint-rs: /abci_query RPC endpoint (closes #287) #296
Conversation
|
||
/// ABCI Merkle proofs | ||
#[derive(Clone, Debug, Eq, Hash, PartialEq)] | ||
pub struct Proof(Vec<u8>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ebuchman this seems like it might have some overlap with the stuff you're working on? That said, is this an OK start?
@@ -9,7 +9,7 @@ use std::{ | |||
/// Block height for a particular chain (i.e. number of blocks created since | |||
/// the chain began) | |||
#[derive(Copy, Clone, Eq, Hash, PartialEq, PartialOrd, Ord)] | |||
pub struct Height(pub u64); | |||
pub struct Height(u64); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With pub
on the u64
this wraps, the Height
type can't maintain invariants (i.e. >0
or >=0
)
7491c6f
to
8daaeb0
Compare
Adds support for invoking the ABCIQuery endpoint: https://tendermint.com/rpc/#abciquery
8daaeb0
to
1fbbf5e
Compare
/// `/abci_query` endpoint | ||
#[test] | ||
fn abci_query() { | ||
// TODO(tarcieri): write integration test for this endpoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike the other endpoints it wasn't clear how to immediately test this in an integration test (with gaiad
)
@@ -0,0 +1,15 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike the other JSON examples found in this directory, this one wasn't taken live from a gaiad
RPC response, but is copy/paste from https://tendermint.com/rpc/#abciquery
Adds support for invoking the ABCIQuery endpoint:
https://tendermint.com/rpc/#abciquery