diff --git a/src/main.cpp b/src/main.cpp index bb1f959ad..98fdf9452 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2444,10 +2444,10 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex vector hashBytes(out.scriptPubKey.begin()+1, out.scriptPubKey.begin()+34); // undo receiving activity - addressIndex.push_back(make_pair(CAddressIndexKey(3, uint160(hashBytes), pindex->nHeight, i, hash, k, false), out.nValue)); + addressIndex.push_back(make_pair(CAddressIndexKey(1, Hash160(hashBytes), pindex->nHeight, i, hash, k, false), out.nValue)); // undo unspent index - addressUnspentIndex.push_back(make_pair(CAddressUnspentKey(3, uint160(hashBytes), hash, k), CAddressUnspentValue())); + addressUnspentIndex.push_back(make_pair(CAddressUnspentKey(1, Hash160(hashBytes), hash, k), CAddressUnspentValue())); } else { @@ -2813,7 +2813,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin addressType = 1; } else if (prevout.scriptPubKey.IsPayToPublicKey()) { - hashBytes = uint160(vector (prevout.scriptPubKey.begin()+1, prevout.scriptPubKey.begin()+34)); + hashBytes = Hash160(vector (prevout.scriptPubKey.begin()+1, prevout.scriptPubKey.begin()+34)); addressType = 1; } else {