Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable pending contributions for external wallet mismatches #11514

Merged
merged 1 commit into from
Dec 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ void ContributionExternalWallet::OnServerPublisherInfo(

BLOG(1, "Publisher not verified");

// TODO(zenparsing): Adding a record to the pending contribution table at
// this point can lead to an (async) infinite loop if pending contributions
// are currently being flushed. In `unverified.cc`, the pending contribution
// processor processes the first available pending record and then sets a
// timer to process the next one. If another record is added before that
// timer expires, it can cause the flushing operation to continue
// indefinitely.

/*
auto save_callback =
std::bind(&ContributionExternalWallet::OnSavePendingContribution,
this,
Expand All @@ -170,6 +179,8 @@ void ContributionExternalWallet::OnServerPublisherInfo(
ledger_->database()->SavePendingContribution(
std::move(list),
save_callback);
*/

callback(type::Result::LEDGER_ERROR);
return;
}
Expand Down