Hopefully avoid a coredump when consolidation=1 and consolidatesaplingaddress is not specified
This commit is contained in:
@@ -2100,11 +2100,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
if (pwalletMain->fSaplingConsolidationEnabled) {
|
||||
//Validate 1 Consolidation address only that matches the sweep address
|
||||
vector<string>& vaddresses = mapMultiArgs["-consolidatesaplingaddress"];
|
||||
pwalletMain->consolidationAddress = vaddresses[0];
|
||||
if (vaddresses.size() == 0) {
|
||||
fConsolidationMapUsed = true;
|
||||
mapMultiArgs["-consolidatesaplingaddress"] = vSweep;
|
||||
} else {
|
||||
pwalletMain->consolidationAddress = vaddresses[0];
|
||||
for (int i = 0; i < vaddresses.size(); i++) {
|
||||
if (vSweep[0] != vaddresses[i]) {
|
||||
return InitError("Consolidation can only be used on the sweep address when sweep is enabled.");
|
||||
|
||||
Reference in New Issue
Block a user