platform icon indicating copy to clipboard operation
platform copied to clipboard

Sending Funds between 2 newly created wallets throws txn-mempool-conflict error and InstantLock timeout error

Open mayoreee opened this issue 3 years ago • 1 comments

Tried to send funds from one wallet to another, using sendFunds().

Expected Behavior

Successfully send funds.

Current Behavior

Throws txn-mempool-conflict error and InstantLock timeout error Screenshot 2022-02-23 at 00 17 57

Steps to Reproduce (for bugs)

const Dash = require('dash');

const clientOpts = {
    network: 'testnet',
    wallet: {
        mnemonic: 'guess nasty atom hint cheap royal orient pepper earth mix permit ketchup',
        unsafeOptions: {
            skipSynchronizationBeforeHeight: 500000, // only sync from mid-2021
        },
    },
};
const client = new Dash.Client(clientOpts);

const sendFunds = async () => {
    const account = await client.getWalletAccount();

    const transaction = account.createTransaction({
        recipient: "<Insert Recepient Address>", // Testnet2 faucet
        satoshis: 1000000, // 0.01 Dash
    });
    return account.broadcastTransaction(transaction);
};

sendFunds()
    .then((d) => console.log('Transaction broadcast!\nTransaction ID:', d))
    .catch((e) => console.error('Something went wrong:\n', e))
    .finally(() => client.disconnect());

// Handle wallet async errors
client.on('error', (error, context) => {
    console.error(`Client error: ${error.name}`);
    console.error(context);
});


Your Environment

mayoreee avatar Feb 22 '22 23:02 mayoreee

Could be related to #253

mayoreee avatar Feb 22 '22 23:02 mayoreee