mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-24 03:45:38 +08:00
don't forget namespace lifetime multiplier
This commit is contained in:
@@ -989,8 +989,9 @@ class BlockstackDB( virtualchain.StateEngine ):
|
||||
# preorder must be younger than the namespace lifetime
|
||||
# (otherwise we get into weird conditions where someone can preorder
|
||||
# a name before someone else, and register it after it expires)
|
||||
if preorder['block_number'] + namespace['lifetime'] <= self.lastblock:
|
||||
log.debug("Preorder is too old (accepted at {}, namespace lifetime is {}, current block is {})".format(preorder['block_number'], namespace['lifetime'], self.lastblock))
|
||||
namespace_lifetime_multiplier = get_epoch_namespace_lifetime_multiplier( self.lastblock, namespace_id )
|
||||
if preorder['block_number'] + (namespace['lifetime'] * namespace_lifetime_multiplier) <= self.lastblock:
|
||||
log.debug("Preorder is too old (accepted at {}, namespace lifetime is {}, current block is {})".format(preorder['block_number'], namespace['lifetime'] * namespace_lifetime_multiplier, self.lastblock))
|
||||
return None
|
||||
|
||||
return preorder
|
||||
|
||||
Reference in New Issue
Block a user