Guest User

Untitled

a guest
Aug 24th, 2022
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. std::vector<CWalletTx*> CWallet::GetSortedTxs()
  2. {
  3.     AssertLockHeld(cs_wallet);
  4.     // Sort pending transactions based on their initial wallet insertion order
  5.     std::vector<CWalletTx*> out;
  6.     for (auto& [_, wtx] : mapWallet) out.push_back(&wtx);
  7.     std::sort(out.begin(), out.end(), [](CWalletTx* a, CWalletTx* b){ return a->nOrderPos < b->nOrderPos; });
  8.     return out;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment