TypeError: message.toBuffer is not a function
at Peer.sendMessage (/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:194:29)
at Peer. (/var/sentora/hostdata/zadmin/private_js/node.js:23:8)
at emitNone (events.js:67:13)
at Peer.emit (events.js:166:7)
at Peer. (/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:85:10)
at emitOne (events.js:77:13)
at Peer.emit (events.js:169:7)
at Peer._readMessage (/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:221:10)
at Peer._readMessage (/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:222:10)
at Socket. (/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:167:10)
Why can't I send messages?
/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:194 this.socket.write(message.toBuffer()); ^
TypeError: message.toBuffer is not a function at Peer.sendMessage (/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:194:29) at Peer. (/var/sentora/hostdata/zadmin/private_js/node.js:23:8)
at emitNone (events.js:67:13)
at Peer.emit (events.js:166:7)
at Peer. (/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:85:10)
at emitOne (events.js:77:13)
at Peer.emit (events.js:169:7)
at Peer._readMessage (/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:221:10)
at Peer._readMessage (/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:222:10)
at Socket. (/var/sentora/hostdata/zadmin/node_modules/bitcore-p2p/lib/peer.js:167:10)