| 1239 | } |
| 1240 | |
| 1241 | static UniValue OrphanToJSON(const node::TxOrphanage::OrphanInfo& orphan) |
| 1242 | { |
| 1243 | UniValue o(UniValue::VOBJ); |
| 1244 | o.pushKV("txid", orphan.tx->GetHash().ToString()); |
| 1245 | o.pushKV("wtxid", orphan.tx->GetWitnessHash().ToString()); |
| 1246 | o.pushKV("bytes", orphan.tx->ComputeTotalSize()); |
| 1247 | o.pushKV("vsize", GetVirtualTransactionSize(*orphan.tx)); |
| 1248 | o.pushKV("weight", GetTransactionWeight(*orphan.tx)); |
| 1249 | UniValue from(UniValue::VARR); |
| 1250 | for (const auto fromPeer: orphan.announcers) { |
| 1251 | from.push_back(fromPeer); |
| 1252 | } |
| 1253 | o.pushKV("from", from); |
| 1254 | return o; |
| 1255 | } |
| 1256 | |
| 1257 | static RPCMethod getorphantxs() |
| 1258 | { |
no test coverage detected