platform
platform copied to clipboard
Sending Funds between 2 newly created wallets throws txn-mempool-conflict error and InstantLock timeout error
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

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
- Version used: [email protected]
Could be related to #253