mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-21 09:55:29 +08:00
optionally get name history rows in reverse
This commit is contained in:
@@ -830,12 +830,12 @@ class BlockstackDB( virtualchain.StateEngine ):
|
||||
return namedb_get_namespace_at(cur, namespace_id, block_number, include_expired=True)
|
||||
|
||||
|
||||
def get_name_history( self, name ):
|
||||
def get_name_history( self, name, offset=None, count=None, reverse=False):
|
||||
"""
|
||||
Get the historic states for a name
|
||||
Get the historic states for a name, grouped by block height.
|
||||
"""
|
||||
cur = self.db.cursor()
|
||||
name_hist = namedb_get_history( cur, name )
|
||||
name_hist = namedb_get_history( cur, name, offset=offset, count=count, reverse=reverse )
|
||||
return name_hist
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user