Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/cdefs.py
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | |||||
COINBASE_MATURITY = 100 | COINBASE_MATURITY = 100 | ||||
# Minimum size a transaction can have. | # Minimum size a transaction can have. | ||||
MIN_TX_SIZE = 100 | MIN_TX_SIZE = 100 | ||||
# Maximum bytes in a TxOut pubkey script | # Maximum bytes in a TxOut pubkey script | ||||
MAX_TXOUT_PUBKEY_SCRIPT = 10000 | MAX_TXOUT_PUBKEY_SCRIPT = 10000 | ||||
# MTP time for activation of 'great wall' network upgrade. | |||||
GREAT_WALL_ACTIVATION_TIME = 1557921600 | |||||
jasonbcox: The tests shouldn't care about the actual activation time. It's an unnecessary dependency. | |||||
dagurvalUnsubmitted Not Done Inline ActionsAnd they don't care, but may as well mimic reality as closely as possible dagurval: And they don't care, but may as well mimic reality as closely as possible | |||||
deadalnixUnsubmitted Not Done Inline ActionsChoosing a value that has nothing to do with anything in the cpp codebase ensure that this doesn't just happen to be working for reasons others than what we expect. For instance, using this, if the command line parameter do not work, we wouldn't know. activation_tests.cpp actually checks that the trigger is set at the right time. deadalnix: Choosing a value that has nothing to do with anything in the cpp codebase ensure that this… | |||||
if __name__ == "__main__": | if __name__ == "__main__": | ||||
# Output values if run standalone to verify | # Output values if run standalone to verify | ||||
print("DEFAULT_MAX_BLOCK_SIZE = %d (bytes)" % DEFAULT_MAX_BLOCK_SIZE) | print("DEFAULT_MAX_BLOCK_SIZE = %d (bytes)" % DEFAULT_MAX_BLOCK_SIZE) | ||||
print("MAX_BLOCK_SIGOPS_PER_MB = %d (sigops)" % MAX_BLOCK_SIGOPS_PER_MB) | print("MAX_BLOCK_SIGOPS_PER_MB = %d (sigops)" % MAX_BLOCK_SIGOPS_PER_MB) | ||||
print("MAX_TX_SIGOPS_COUNT = %d (sigops)" % MAX_TX_SIGOPS_COUNT) | print("MAX_TX_SIGOPS_COUNT = %d (sigops)" % MAX_TX_SIGOPS_COUNT) | ||||
print("COINBASE_MATURITY = %d (blocks)" % COINBASE_MATURITY) | print("COINBASE_MATURITY = %d (blocks)" % COINBASE_MATURITY) |
The tests shouldn't care about the actual activation time. It's an unnecessary dependency. Look at other tests for *_ACTIVATION_TIME and you'll see them set to arbitrarily large values like 9999999. This should be sufficient to set a value like this in all tests where it's needed.