我正在尝试基于以下示例在 javascript SDK 中实现事务处理器
https://github.com/hyperledger/sawtooth-core/blob/master/sdk/examples/intkey_javascript/index.js
这是我在 javascript SDK 中运行事务处理器的代码
//validator public key
const validatorAddress = '024c512a6d66917d7d00f52fa299a88594915dab27bddbcd2a80154984d7948c3c';
const IntegerKeyHandler = require('./handler');
const startProcessor = function startProcessor(){
const transactionProcessor = new TransactionProcessor(validatorAddress);
transactionProcessor.addHandler(new IntegerKeyHandler())
transactionProcessor.start()
}
但我收到无效参数错误
错误:在 Stream.connect (/var/accubits-工作区/hypeerledger-sawtooth/tuts/node_modules/sawtooth-sdk/messaging/stream.js:85:18) 在 TransactionProcessor.start (/var/accubits-workspace/hypeerledger-sawtooth/tuts/node_modules/sawtooth-sdk/processor/ index.js:72:18) 在 Object.startProcessor (/var/accubits-workspace/hypeerledger-sawtooth/tuts/helpers/transaction-processor.js:15:26) 在 app.get (/var/accubits-workspace/ hypeerledger-sawtooth/tuts/index.js:62:26) 在 Layer.handle [as handle_request] (/var/accubits-workspace/hypeerledger-sawtooth/tuts/node_modules/express/lib/router/layer.js:95:5) 在下一个 (/var/accubits-workspace/hypeerledger-sawtooth/tuts/node_modules/express/lib/router/route.js:137:13) 在 Route.dispatch (/var/accubits-workspace/hypeerledger-sawtooth/ tuts/node_modules/express/lib/router/route.js:112:3) 在 Layer.handle [as handle_request] (/var/accubits-workspace/hypeerledger-sawtooth/tuts/node_modules/express/lib/router/layer. js:95:5) 在 /var/accubits-workspace/hypeerledger-sawtooth/tuts/node_modules/express/lib/router/index.js:281:225) 在/var/accubits-workspace/hypeerledger-sawtooth/tuts/node_modules/express/lib/router/index.js:281:225) 在/var/accubits-workspace/hypeerledger-sawtooth/tuts/node_modules/express/lib/router/index.js:281:22