mirror of
https://github.com/Cuprate/cuprate.git
synced 2025-01-22 18:54:34 +00:00
add some more definitions
This commit is contained in:
parent
ba085f6b02
commit
25a472dd9b
7 changed files with 31 additions and 1 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -654,6 +654,7 @@ dependencies = [
|
||||||
"dandelion-tower",
|
"dandelion-tower",
|
||||||
"futures",
|
"futures",
|
||||||
"monero-p2p",
|
"monero-p2p",
|
||||||
|
"monero-serai",
|
||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
members = [
|
members = [
|
||||||
|
"binaries/cuprated",
|
||||||
"consensus",
|
"consensus",
|
||||||
"consensus/rules",
|
"consensus/rules",
|
||||||
"cryptonight",
|
"cryptonight",
|
||||||
|
@ -19,7 +20,7 @@ members = [
|
||||||
"storage/database",
|
"storage/database",
|
||||||
"pruning",
|
"pruning",
|
||||||
"test-utils",
|
"test-utils",
|
||||||
"types", "binaries/cuprated",
|
"types",
|
||||||
]
|
]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
|
|
@ -16,6 +16,7 @@ cuprate-blockchain = { path = "../../storage/cuprate-blockchain" }
|
||||||
|
|
||||||
# Consensus
|
# Consensus
|
||||||
cuprate-consensus = { path = "../../consensus" }
|
cuprate-consensus = { path = "../../consensus" }
|
||||||
|
monero-serai = { workspace = true }
|
||||||
|
|
||||||
# Async
|
# Async
|
||||||
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
|
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
mod network;
|
mod network;
|
||||||
mod p2p_request_handler;
|
mod p2p_request_handler;
|
||||||
mod syncer;
|
mod syncer;
|
||||||
|
mod tx_pool;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
use cuprate_blockchain::service::DatabaseReadHandle;
|
||||||
|
|
||||||
|
pub struct P2PRequestHandler {
|
||||||
|
database: DatabaseReadHandle,
|
||||||
|
|
||||||
|
txpool: (),
|
||||||
|
}
|
|
@ -2,3 +2,20 @@
|
||||||
//!
|
//!
|
||||||
//! The syncer is the part of Cuprate that handles keeping the blockchain state, it handles syncing if
|
//! The syncer is the part of Cuprate that handles keeping the blockchain state, it handles syncing if
|
||||||
//! we have fallen behind, and it handles incoming blocks.
|
//! we have fallen behind, and it handles incoming blocks.
|
||||||
|
use monero_serai::{block::Block, transaction::Transaction};
|
||||||
|
|
||||||
|
use monero_p2p::handles::ConnectionHandle;
|
||||||
|
|
||||||
|
pub struct IncomingFluffyBlock {
|
||||||
|
block: Block,
|
||||||
|
included_txs: Vec<Transaction>,
|
||||||
|
peer_handle: ConnectionHandle,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A response to an [`IncomingFluffyBlock`]
|
||||||
|
pub enum IncomingFluffyBlockResponse {
|
||||||
|
/// We are missing these transactions from the block.
|
||||||
|
MissingTransactions(Vec<[u8; 32]>),
|
||||||
|
/// A generic ok response.
|
||||||
|
Ok,
|
||||||
|
}
|
||||||
|
|
2
binaries/cuprated/src/tx_pool.rs
Normal file
2
binaries/cuprated/src/tx_pool.rs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
//! # Transaction Pool
|
||||||
|
//!
|
Loading…
Reference in a new issue