Error: Tendermint node crash

0 votes

Following is my  index.js file content:

const admin = require("firebase-admin")
const db = admin.database()

let app = require('lotion')
({
  initialState: {count: 0}
})

function txHandler(state, tx, chainInfo) {
  state.count++
}

var port = process.env.PORT || 3000
app.use(txHandler)
app.listen(port)

db.ref('Deal').orderByChild('createdTime').startAt(Date.now())
.on("child_added", function(snapshot, prevChildKey) {

   var txnObject = {}
   txnObject.senderId = snapshot.val().senderId
   txnObject.name = snapshot.val().name
   txnObject.phoneNumber = snapshot.val().phoneNumber
   txnObject.receiverId = snapshot.val().receiverId
   txnObject.amount = snapshot.val().amount

   axios.post('http://localhost:' + port + '/txs', txnObject).then(function(response){
   console.log('saved successfully')
   }).catch(function(error) {
       console.log('failed to save')
       console.log(error)
  })
})

And the error I am getting is:

Error: Tendermint node crashed
    at ChildProcess.tendermintProcess.on (/Users/chandrika/Documents/lotion-js/node_modules/lotion/lib/tendermint.js:90:13)
    at ChildProcess.emit (events.js:160:13)
    at maybeClose (internal/child_process.js:943:16)
    at Socket.stream.socket.on (internal/child_process.js:363:11)
    at Socket.emit (events.js:160:13)
    at Pipe._handle.close [as _onclose] (net.js:562:12)

 As I am new to blockchain concept, I don't know the reason behind the crash. Can anyone help me?

Jun 21, 2018 in Blockchain by nsv999
• 5,050 points
54 views

1 answer to this question.

0 votes

It's very simple. Just type in the following command:

$ rm -rf ~/.lotion

followed by:

$node index,js

 votaccepted

answered Jun 21, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

0 votes
1 answer

AWS multichain network, "Couldn't connect to the seed node" error

The error says "please check multichaind is ...READ MORE

answered Jul 9, 2018 in Blockchain by slayer
• 29,050 points
120 views
0 votes
1 answer

Fatal error while installing web3 node.

Try to add git config by executing ...READ MORE

answered Aug 10, 2018 in Blockchain by digger
• 27,620 points
308 views
+1 vote
4 answers

Installing Nodejs: sh: node: command not found error

You have to first install nodejs and ...READ MORE

answered Oct 22, 2018 in Blockchain by Omkar
• 67,120 points
2,449 views
0 votes
1 answer

Hyperledger fabcar: node enrollAdmin.js error

Update the node: npm rebuild and then run ...READ MORE

answered Oct 26, 2018 in Blockchain by anonymous
198 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
105 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,620 points
119 views
0 votes
0 answers

Blockchain.info wallet API callback

I am implementing blockchain.info wallet api to ...READ MORE

Jul 4, 2018 in Blockchain by sabby
• 4,350 points
123 views
0 votes
1 answer

Hyperledger Composer rest server NPM versions

The Hyperledger Composer pre-requisites can be installed ...READ MORE

answered Jul 13, 2018 in Blockchain by Christine
• 15,790 points
76 views
+3 votes
4 answers

How do I add a new node on a Hyperledger network?

You can do this by generating the crypto ...READ MORE

answered Apr 6, 2018 in Blockchain by Christine
• 15,790 points
1,399 views
+1 vote
1 answer

Error while deploying chaincode in IBM Blockchain. Please help.

Try stripping out the 'tree/master' portion of ...READ MORE

answered Apr 26, 2018 in Blockchain by Christine
• 15,790 points
77 views