mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-20 15:55:26 +08:00
rename *_nameops_* to *_blockstack_ops_* for code clarity
This commit is contained in:
@@ -924,7 +924,7 @@ class BlockstackdRPC(BoundedThreadingMixIn, SimpleXMLRPCServer):
|
||||
return self.success_response( {'records': ret} )
|
||||
|
||||
|
||||
def rpc_get_num_nameops_at(self, block_id, **con_info):
|
||||
def rpc_get_num_blockstack_ops_at(self, block_id, **con_info):
|
||||
"""
|
||||
Get the number of Blockstack transactions that occured at the given block.
|
||||
Returns {'count': ..} on success
|
||||
@@ -934,14 +934,14 @@ class BlockstackdRPC(BoundedThreadingMixIn, SimpleXMLRPCServer):
|
||||
return {'error': 'Invalid block height', 'http_status': 400}
|
||||
|
||||
db = get_db_state(self.working_dir)
|
||||
count = db.get_num_nameops_at( block_id )
|
||||
count = db.get_num_blockstack_ops_at( block_id )
|
||||
db.close()
|
||||
|
||||
log.debug("{} name operations at {}".format(count, block_id))
|
||||
return self.success_response({'count': count})
|
||||
|
||||
|
||||
def rpc_get_nameops_at(self, block_id, offset, count, **con_info):
|
||||
def rpc_get_blockstack_ops_at(self, block_id, offset, count, **con_info):
|
||||
"""
|
||||
Get the name operations that occured in the given block.
|
||||
|
||||
@@ -958,7 +958,7 @@ class BlockstackdRPC(BoundedThreadingMixIn, SimpleXMLRPCServer):
|
||||
return {'error': 'Invalid count', 'http_status': 400}
|
||||
|
||||
db = get_db_state(self.working_dir)
|
||||
nameops = db.get_all_nameops_at(block_id, offset=offset, count=count)
|
||||
nameops = db.get_all_blockstack_ops_at(block_id, offset=offset, count=count)
|
||||
db.close()
|
||||
|
||||
log.debug("{} name operations at block {}, offset {}, count {}".format(len(nameops), block_id, offset, count))
|
||||
@@ -972,7 +972,7 @@ class BlockstackdRPC(BoundedThreadingMixIn, SimpleXMLRPCServer):
|
||||
return self.success_response({'nameops': ret})
|
||||
|
||||
|
||||
def rpc_get_nameops_hash_at( self, block_id, **con_info ):
|
||||
def rpc_get_blockstack_ops_hash_at( self, block_id, **con_info ):
|
||||
"""
|
||||
Get the hash over the sequence of names and namespaces altered at the given block.
|
||||
Used by SNV clients.
|
||||
@@ -1680,7 +1680,7 @@ class BlockstackdRPC(BoundedThreadingMixIn, SimpleXMLRPCServer):
|
||||
random.shuffle(peer_list)
|
||||
peer_list = peer_list[:atlas_max_neighbors()]
|
||||
|
||||
log.debug("Enqueue remote peer {}:{}".format(peer_host, peer_port))
|
||||
log.info("Enqueue remote peer {}:{}".format(peer_host, peer_port))
|
||||
atlas_peer_enqueue( "%s:%s" % (peer_host, peer_port))
|
||||
|
||||
log.debug("Live peers reply to %s:%s: %s" % (peer_host, peer_port, peer_list))
|
||||
@@ -3038,4 +3038,3 @@ def run_blockstackd():
|
||||
print "Start your node with `blockstack-core start`"
|
||||
print "Pass `--debug` for extra output."
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user