New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Mockchain properties #108
Conversation
e50bbd9
to
9f01539
Compare
9f01539
to
49a7d6f
Compare
Ledger { | ||
unspent_outputs: genesis, | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I would have modified the new()
function to take the genesis state. I don't see a reason not to provide the genesis state.
Introduce new tests that can be used for testing any ledger that have required traits implemented. The tests do not require any special properties from the blockchain, other than listed in the blockcfg::properties. More involved tests that care about the structure may be written latter.
49a7d6f
to
e852011
Compare
@@ -309,6 +321,7 @@ impl std::fmt::Display for Error { | |||
} | |||
Error::InvalidSignature(_, _, _) => write!(f, "Input is not signed properly"), | |||
Error::InvalidTxSignature(_) => write!(f, "Transaction was not signed"), | |||
Error::TransactionSumIsNonZero(_, _) => write!(f, "Transaction is not zero"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message leaves out the "sum". Could it be named more concisely: NonZeroBalance?
code has moved to rust-cardano repo, closing |
This is a work in progress branch, for storing early discussions about the mockchain testing.