Skip to content

Commit

Permalink
run the tx for JSON-RPC transact() #53
Browse files Browse the repository at this point in the history
  • Loading branch information
ethers committed Nov 20, 2014
1 parent 2b437d9 commit cc59299
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/wsRPC.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ exports.start = function(options, done) {
});
},
transact: function(obj, cb) {
console.log('@@@@ obj: ', obj)

var tx = new Transaction([
bignum(obj.nonce).toBuffer(),
bignum(obj.gasPrice).toBuffer(),
Expand All @@ -125,8 +123,11 @@ console.log('@@@@ obj: ', obj)
]);

self.accountMan.sign(tx, function(err, signedTx) {
console.log('@@@ signedTx.r: ', signedTx.r)
cb();
if (err) {
cb(err);
return;
}
self.vm.runTx(signedTx, self.blockchain.head, cb);
})
},
coinbase: function(cb) {
Expand All @@ -135,7 +136,6 @@ console.log('@@@ signedTx.r: ', signedTx.r)
cb(err);
return;
}
console.log('@@@ coinbase: ', coinbase)
cb(null, coinbase);
});
},
Expand Down

0 comments on commit cc59299

Please sign in to comment.