Skip to content

Commit

Permalink
Add backward compatibility with ReadAddressUnspentIndex
Browse files Browse the repository at this point in the history
Avian Core <= 3.1.0 uses RVN as the main asset.
  • Loading branch information
alamshafil committed Aug 2, 2022
1 parent e8f296a commit 6450bb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/txdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ bool CBlockTreeDB::ReadAddressUnspentIndex(uint160 addressHash, int type,
if (pcursor->GetKey(key) && key.first == DB_ADDRESSUNSPENTINDEX && key.second.hashBytes == addressHash) {
CAddressUnspentValue nValue;
if (pcursor->GetValue(nValue)) {
if (key.second.asset != "AVN") {
// Avian Core <= 3.1.0 uses RVN as the main asset.
if (key.second.asset != "AVN" || key.second.asset != "RVN") {
unspentOutputs.push_back(std::make_pair(key.second, nValue));
}
pcursor->Next();
Expand Down

0 comments on commit 6450bb9

Please sign in to comment.