Fix cursor ordering

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
This commit is contained in:
Anthony Fieroni 2020-02-20 18:32:11 +02:00
parent ae9b82a721
commit deb58491ca

View file

@ -245,7 +245,7 @@ CCoinsViewCursor *CCoinsViewDB::Cursor() const
CCoinsViewDBCursor::CCoinsViewDBCursor(const uint256 &hashBlockIn, const CCoinsViewDB* view) CCoinsViewDBCursor::CCoinsViewDBCursor(const uint256 &hashBlockIn, const CCoinsViewDB* view)
: CCoinsViewCursor(hashBlockIn), owner(view), : CCoinsViewCursor(hashBlockIn), owner(view),
query(owner->db << "SELECT txID, txN, isCoinbase, blockHeight, amount, script FROM unspent") query(owner->db << "SELECT txID, txN, isCoinbase, blockHeight, amount, script FROM unspent ORDER BY txID ASC, txN ASC")
{ {
iter = query.begin(); iter = query.begin();
} }