-
Notifications
You must be signed in to change notification settings - Fork 120
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
fixed block verification core tests #186
Conversation
@@ -413,7 +380,7 @@ bool gen_block_miner_tx_out_is_small::generate(std::vector<test_event_entry>& ev | |||
BLOCK_VALIDATION_INIT_GENERATE(); | |||
|
|||
MAKE_MINER_TX_MANUALLY(miner_tx, blk_0); | |||
miner_tx.vout[0].amount /= 2; | |||
miner_tx.vout[0].amount *= 2; | |||
|
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.
What is this testing that you changed it from /=2 to *=2? gen_block_miner_tx_out_is_big::generate seems to cover this *=2 scenario.
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.
Good catch, should be /
. However, the gen_block_miner_tx_out_is_small
doesn't make sense in loki and should be skipped. "From hard fork 2, we allow a miner to claim less block reward than is allowed".
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.
So i.e. a miners reward can never be to small? So this test only applies from hardfork < 2? If thats the case, we can delete this test case and once thats done we can merge this in.
…evant to hardfork version 1
f2f2e89
to
7fe0dc5
Compare
* core: submit uptime proof immediately after registering * Increase visibility of autostaking prompts * quorum_cop: changed uptime proof prune timeout to 2 hours 10 minutes * cleanup: removed scope limiting block * check_tx_inputs: fix deregister double spend test to include deregisters from other heights * config: new testnet network id, genesis tx, and version bump * wallet2: fix testnet wallet blockheight approximation * Fix change in address format in RPC which broke parsing and pooling contributors (oxen-io#184) * Fix service node endpoints for RPC to also use stdout (oxen-io#185) * fixed some further rct core tests (oxen-io#180) * Fix service node state by calling detached hooks on failure to switch to alt chain (oxen-io#188) * fixed block verification core tests (oxen-io#186) * fixed block verification core tests * core tests: removed gen_block_miner_tx_out_is_small which is only relevant to hardfork version 1 * Don't consider expired deregistrations when filling block template * Add unit tests for getting staking requirement (oxen-io#191) * First service node test (oxen-io#190) * core_tests: added service node tests * core_tests: check balance after registration tx * Fix underflow for popping rollback events (oxen-io#189) * Move deregistration age check into check_tx_inputs * Zero initialise rct_signatures member txnFee is a uint64_t and has uninit values * Enforce that deregisters must be 0 fee since we skip checks * Add unit tests for vote validation (oxen-io#193) * Add unit tests for deregistration validation (oxen-io#194) * Mainnet checkpoint 86535, testnet 3591, 4166 * Bump version number * Add print_sr for getting staking requirement (oxen-io#198) * Misc bugfixes (oxen-io#203) * removed unnecessary cast to double during txfee+coinbase calculation * simplewallet: increased autostaking interval from 2 minutes to 40 * Fix casting issues from uint to int (oxen-io#204) * core_tests: check service node registration and expiration (oxen-io#195) * core_tests: check service node registration and deregistration * core_tests for service nodes: - include service nodes rewards when calculating account's balance - check that service nodes rewards have been received * fixed namespace error; reduced the scope of staking requirement constants * On blockchain inc/dec mark deregisters relayble based on age (oxen-io#201) * Service nodes restore only 1 rollback bug (oxen-io#206) * Fix restore 1 rollback event, ensure prevent rollback is always added * Remove adding prevent_rollback event at init It gets called in on block added generic anyway. * Log db exception, fix relation operators for vote/deregister lifetime (oxen-io#207) * Filter relayable deregisters w/ check_tx_inputs instead of blockchain callbacks * Bump version to 0.3.7-beta * fix build with GCC 8.1.0 (oxen-io#211) * Add temp hardfork rule in testnet for deregister lifetimes (oxen-io#210) * Update testnet, remove testnet forks, remove checkpoints, update blockheight estimate (oxen-io#212) * Don't ban peers for a bad vote, just drop their connection (oxen-io#213) * Update to version 0.3.0 release candidate (oxen-io#215)
Among others fixes, this changes test transactions to have governance reward.