mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-12-23 03:59:37 +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]
|
[dependencies]
|
||||||
cuprate-epee-encoding = { path = "../../net/epee-encoding", optional = true }
|
cuprate-epee-encoding = { path = "../../net/epee-encoding", optional = true }
|
||||||
cuprate-fixed-bytes = { path = "../../net/fixed-bytes" }
|
cuprate-fixed-bytes = { path = "../../net/fixed-bytes" }
|
||||||
cuprate-types = { path = "../../types" }
|
cuprate-types = { path = "../../types", default-features = false, features = ["epee", "serde"] }
|
||||||
|
|
||||||
paste = { workspace = true }
|
paste = { workspace = true }
|
||||||
serde = { workspace = true, optional = true }
|
serde = { workspace = true, optional = true }
|
||||||
|
|
|
@ -635,7 +635,9 @@ define_request_and_response! {
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
blob: String,
|
blob: String,
|
||||||
block_header: BlockHeader,
|
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,
|
miner_tx_hash: String,
|
||||||
tx_hashes: Vec<String> = default_vec::<String>(), "default_vec",
|
tx_hashes: Vec<String> = default_vec::<String>(), "default_vec",
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,6 +72,8 @@ pub enum TxEntry {
|
||||||
/// This entry exists in the transaction pool.
|
/// This entry exists in the transaction pool.
|
||||||
InPool {
|
InPool {
|
||||||
as_hex: String,
|
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,
|
as_json: String,
|
||||||
block_height: u64,
|
block_height: u64,
|
||||||
block_timestamp: u64,
|
block_timestamp: u64,
|
||||||
|
@ -89,6 +91,8 @@ pub enum TxEntry {
|
||||||
/// This entry _does not_ exist in the transaction pool.
|
/// This entry _does not_ exist in the transaction pool.
|
||||||
NotInPool {
|
NotInPool {
|
||||||
as_hex: String,
|
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,
|
as_json: String,
|
||||||
double_spend_seen: bool,
|
double_spend_seen: bool,
|
||||||
prunable_as_hex: String,
|
prunable_as_hex: String,
|
||||||
|
|
|
@ -140,6 +140,8 @@ define_request_and_response! {
|
||||||
#[doc = serde_doc_test!(GET_TRANSACTIONS_RESPONSE)]
|
#[doc = serde_doc_test!(GET_TRANSACTIONS_RESPONSE)]
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
txs_as_hex: Vec<String> = default_vec::<String>(), "default_vec",
|
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",
|
txs_as_json: Vec<String> = default_vec::<String>(), "default_vec",
|
||||||
missed_tx: Vec<String> = default_vec::<String>(), "default_vec",
|
missed_tx: Vec<String> = default_vec::<String>(), "default_vec",
|
||||||
txs: Vec<TxEntry> = default_vec::<TxEntry>(), "default_vec",
|
txs: Vec<TxEntry> = default_vec::<TxEntry>(), "default_vec",
|
||||||
|
|
Loading…
Reference in a new issue