MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / addNewRequest

Method addNewRequest

src/qt/recentrequeststablemodel.cpp:173–187  ·  view source on GitHub ↗

called when adding a request from the GUI

Source from the content-addressed store, hash-verified

171
172// called when adding a request from the GUI
173void RecentRequestsTableModel::addNewRequest(const SendCoinsRecipient &recipient)
174{
175 RecentRequestEntry newEntry;
176 newEntry.id = ++nReceiveRequestsMaxId;
177 newEntry.date = QDateTime::currentDateTime();
178 newEntry.recipient = recipient;
179
180 DataStream ss{};
181 ss << newEntry;
182
183 if (!walletModel->wallet().setAddressReceiveRequest(DecodeDestination(recipient.address.toStdString()), ToString(newEntry.id), ss.str()))
184 return;
185
186 addNewRequest(newEntry);
187}
188
189// called from ctor when loading from wallet
190void RecentRequestsTableModel::addNewRequest(const std::string &recipient)

Callers 1

Calls 7

DecodeDestinationFunction · 0.85
MakeByteSpanFunction · 0.85
strMethod · 0.80
QModelIndexClass · 0.70
ToStringFunction · 0.50
walletMethod · 0.45

Tested by

no test coverage detected