REF: speeded up electrum (caching of some requests)

This commit is contained in:
Overtorment 2021-04-28 07:55:27 +01:00
parent 012216fd3e
commit 42a413ee95
2 changed files with 4 additions and 2 deletions

View File

@ -576,7 +576,9 @@ module.exports.multiGetTransactionByTxid = async function (txids, batchsize, ver
// saving cache:
realm.write(() => {
for (const txid of Object.keys(ret)) {
if (!ret[txid].confirmations || ret[txid].confirmations < 7) continue; // dont cache immature txs
if (verbose && (!ret[txid].confirmations || ret[txid].confirmations < 7)) continue;
// dont cache immature txs, but only for 'verbose', since its fully decoded tx jsons. non-verbose are just plain
// strings txhex
realm.create(
'Cache',
{

View File

@ -443,7 +443,7 @@ const SendDetails = () => {
const changeAddress = await getChangeAddressAsync();
const requestedSatPerByte = Number(feeRate);
const lutxo = utxo || wallet.getUtxo();
console.log({ requestedSatPerByte, lutxo });
console.log({ requestedSatPerByte, lutxo: lutxo.length });
const targets = [];
for (const transaction of addresses) {