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) {
|
if (pwalletMain->fSaplingConsolidationEnabled) {
|
||||||
//Validate 1 Consolidation address only that matches the sweep address
|
//Validate 1 Consolidation address only that matches the sweep address
|
||||||
vector<string>& vaddresses = mapMultiArgs["-consolidatesaplingaddress"];
|
vector<string>& vaddresses = mapMultiArgs["-consolidatesaplingaddress"];
|
||||||
pwalletMain->consolidationAddress = vaddresses[0];
|
|
||||||
if (vaddresses.size() == 0) {
|
if (vaddresses.size() == 0) {
|
||||||
fConsolidationMapUsed = true;
|
fConsolidationMapUsed = true;
|
||||||
mapMultiArgs["-consolidatesaplingaddress"] = vSweep;
|
mapMultiArgs["-consolidatesaplingaddress"] = vSweep;
|
||||||
} else {
|
} else {
|
||||||
|
pwalletMain->consolidationAddress = vaddresses[0];
|
||||||
for (int i = 0; i < vaddresses.size(); i++) {
|
for (int i = 0; i < vaddresses.size(); i++) {
|
||||||
if (vSweep[0] != vaddresses[i]) {
|
if (vSweep[0] != vaddresses[i]) {
|
||||||
return InitError("Consolidation can only be used on the sweep address when sweep is enabled.");
|
return InitError("Consolidation can only be used on the sweep address when sweep is enabled.");
|
||||||
|
|||||||
Reference in New Issue
Block a user