Skip to content

Conversation

@MoonKraken
Copy link
Owner

The crate contains a lib and bin. All of the logic is in lib, and bin doesn't do a whole lot quite yet.

A somewhat thorough demonstration of the current capabilities can be found in the test in tests/two_node.rs.

Copy link

@letsgetrusty letsgetrusty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks like a great first pass! The tests make it easier to review the code as well!

timestamp,
};

let confirmed_transactions = vec![genesis_transaction.clone()].into_iter().collect();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Do you plan on keeping these confirmed transactions in BlockChain?

I'm assuming this is for either testing purposes or intended for the genesis transactions only? If it's the latter, we can probably create a genesis Block with genesis transactions instead, right?

The reason I'm asking is that it feels like duplicated data since we have transactions in Block too.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed transactions is intended to have all transactions from every block in the chain, solely to facilitate O(1) lookups.

that said - completely separate thing but I'm not entirely sure we need to have any transactions in the genesis block.

@MoonKraken MoonKraken merged commit 4705e7b into main Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants