Send a transaction using bitcoinjs-lib to testnet in a box

I put together some code using bitcoinjs-lib which allows me to create a testnet transaction and send some bitcoins from one address to another.

But I’m getting tired of waiting for 10 mins after every test. I’d like to be able to test my code a bit faster.

I set up testnet-in-a-box in a virtual machine and have played around with a few commands and it works fine.

But when I try to send a transaction to one of the nodes at 127.0.0.1:19000 it gives me an error saying:

{ [Error: socket hang up] code: 'ECONNRESET' } 

I’m broadcasting the transaction as shown here using:

blockchain.t.transactions.propagate(tx.build().toHex(), done) 

What am I doing wrong? Is it not possible to submit transactions to the node in testnet-in-a-box?

Any help will be appreciated! Thanks!

Recent Questions – Bitcoin Stack Exchange