add some more definitions

This commit is contained in:
Boog900 2024-05-31 01:51:33 +01:00
parent ba085f6b02
commit 25a472dd9b
No known key found for this signature in database
GPG key ID: 42AB1287CB0041C2
7 changed files with 31 additions and 1 deletions

1
Cargo.lock generated
View file

@ -654,6 +654,7 @@ dependencies = [
"dandelion-tower",
"futures",
"monero-p2p",
"monero-serai",
"tokio",
]

View file

@ -2,6 +2,7 @@
resolver = "2"
members = [
"binaries/cuprated",
"consensus",
"consensus/rules",
"cryptonight",
@ -19,7 +20,7 @@ members = [
"storage/database",
"pruning",
"test-utils",
"types", "binaries/cuprated",
"types",
]
[profile.release]

View file

@ -16,6 +16,7 @@ cuprate-blockchain = { path = "../../storage/cuprate-blockchain" }
# Consensus
cuprate-consensus = { path = "../../consensus" }
monero-serai = { workspace = true }
# Async
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }

View file

@ -1,6 +1,7 @@
mod network;
mod p2p_request_handler;
mod syncer;
mod tx_pool;
fn main() {
println!("Hello, world!");

View file

@ -0,0 +1,7 @@
use cuprate_blockchain::service::DatabaseReadHandle;
pub struct P2PRequestHandler {
database: DatabaseReadHandle,
txpool: (),
}

View file

@ -2,3 +2,20 @@
//!
//! 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.
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,
}

View file

@ -0,0 +1,2 @@
//! # Transaction Pool
//!