Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<CWalletTx*> CWallet::GetSortedTxs()
- {
- AssertLockHeld(cs_wallet);
- // Sort pending transactions based on their initial wallet insertion order
- std::vector<CWalletTx*> out;
- for (auto& [_, wtx] : mapWallet) out.push_back(&wtx);
- std::sort(out.begin(), out.end(), [](CWalletTx* a, CWalletTx* b){ return a->nOrderPos < b->nOrderPos; });
- return out;
- }
Advertisement
Add Comment
Please, Sign In to add comment