expose getting all namespace preorders; fix typo

This commit is contained in:
Jude Nelson
2018-01-13 23:50:35 -05:00
parent 6e3078b34e
commit a64f4019c0

View File

@@ -728,7 +728,7 @@ class BlockstackDB( virtualchain.StateEngine ):
Includes expired namespaces by default.
"""
return namedb_get_namespace_at(name, block_number, include_expired=True)
return namedb_get_namespace_at(namespace_id, block_number, include_expired=True)
def get_name_history( self, name ):
@@ -916,6 +916,16 @@ class BlockstackDB( virtualchain.StateEngine ):
return namespace_ids
def get_all_preordered_namespace_hashes( self ):
"""
Get all oustanding namespace preorder hashes that have not expired.
Used for testing
"""
cur = self.db.cursor()
namespace_hashes = namedb_get_all_preordered_namespace_hashes( cur, self.lastblock )
return namespace_hashes
def get_all_importing_namespace_hashes( self ):
"""
Get the set of all preordered and revealed namespace hashes that have not expired.