-
Notifications
You must be signed in to change notification settings - Fork 1.7k
jsonrpc #391
Conversation
@@ -19,6 +19,22 @@ use util::*; | |||
use header::*; | |||
use transaction::*; | |||
|
|||
/// Uniqly identifies block in canon blockchain. |
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.
Uniquely. Also blocks from non-canon blockchain can still be identified and requested by hash
Looks ok to me, although it does hide some important details behind the simplified interface. Changing client interface to use |
Hash(H256), | ||
/// Block id and transaction index within this block. | ||
/// Querying by block position is always faster. | ||
BlockPosition(BlockId, usize) |
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.
Try to avoid using two words when one will do - Position
or Location
would be fine here.
looks fine. |
further improvements in jsonrpc
changes:
LocalizedTransaction
. It contains signed transaction and info about transaction location in canon blockchain.BlockId
,TransactionId
that uniquely identifies position of block/transaction in canon blockchainquestions:
BlockId
andTransactionId
should be defined? Right they are in views.rs, but I don't like this location.BlockId
andTransactionId
should be destructurized? Right now it's blockchain.rs, but I don't know if it's a good place.block/block_at
methods in client.rs with one that acceptsBlockId
?