mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-11-16 15:58:14 +00:00
cuprate-rpc-types: add comments
This commit is contained in:
parent
33c31871e1
commit
7dbd514a2d
4 changed files with 10 additions and 2 deletions
|
@ -16,7 +16,7 @@ epee = ["dep:cuprate-epee-encoding"]
|
|||
[dependencies]
|
||||
cuprate-epee-encoding = { path = "../../net/epee-encoding", optional = true }
|
||||
cuprate-fixed-bytes = { path = "../../net/fixed-bytes" }
|
||||
cuprate-types = { path = "../../types" }
|
||||
cuprate-types = { path = "../../types", default-features = false, features = ["epee", "serde"] }
|
||||
|
||||
paste = { workspace = true }
|
||||
serde = { workspace = true, optional = true }
|
||||
|
|
|
@ -635,7 +635,9 @@ define_request_and_response! {
|
|||
AccessResponseBase {
|
||||
blob: String,
|
||||
block_header: BlockHeader,
|
||||
json: String, // FIXME: this should be defined in a struct, it has many fields.
|
||||
/// `cuprate_rpc_types::json::block::Block` should be used
|
||||
/// to create this JSON string in a type-safe manner.
|
||||
json: String,
|
||||
miner_tx_hash: String,
|
||||
tx_hashes: Vec<String> = default_vec::<String>(), "default_vec",
|
||||
}
|
||||
|
|
|
@ -72,6 +72,8 @@ pub enum TxEntry {
|
|||
/// This entry exists in the transaction pool.
|
||||
InPool {
|
||||
as_hex: String,
|
||||
/// `cuprate_rpc_types::json::tx::Transaction` should be used
|
||||
/// to create this JSON string in a type-safe manner.
|
||||
as_json: String,
|
||||
block_height: u64,
|
||||
block_timestamp: u64,
|
||||
|
@ -89,6 +91,8 @@ pub enum TxEntry {
|
|||
/// This entry _does not_ exist in the transaction pool.
|
||||
NotInPool {
|
||||
as_hex: String,
|
||||
/// `cuprate_rpc_types::json::tx::Transaction` should be used
|
||||
/// to create this JSON string in a type-safe manner.
|
||||
as_json: String,
|
||||
double_spend_seen: bool,
|
||||
prunable_as_hex: String,
|
||||
|
|
|
@ -140,6 +140,8 @@ define_request_and_response! {
|
|||
#[doc = serde_doc_test!(GET_TRANSACTIONS_RESPONSE)]
|
||||
AccessResponseBase {
|
||||
txs_as_hex: Vec<String> = default_vec::<String>(), "default_vec",
|
||||
/// `cuprate_rpc_types::json::tx::Transaction` should be used
|
||||
/// to create this JSON string in a type-safe manner.
|
||||
txs_as_json: Vec<String> = default_vec::<String>(), "default_vec",
|
||||
missed_tx: Vec<String> = default_vec::<String>(), "default_vec",
|
||||
txs: Vec<TxEntry> = default_vec::<TxEntry>(), "default_vec",
|
||||
|
|
Loading…
Reference in a new issue