From 7c69c45a2f652905736b26d873fd32da43ff3972 Mon Sep 17 00:00:00 2001 From: jed Date: Thu, 15 Nov 2012 13:17:36 -0800 Subject: [PATCH] . --- src/js/remote.js | 4 ++-- test/config.js | 3 ++- test/send-test.js | 29 +++++++++++++---------------- test/testutils.js | 2 +- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/js/remote.js b/src/js/remote.js index 5ae60c0780..347bc9d7fc 100644 --- a/src/js/remote.js +++ b/src/js/remote.js @@ -1355,7 +1355,7 @@ Transaction.prototype.password_fund = function (src, dst) { Transaction.prototype.password_set = function (src, authorized_key, generator, public_key, signature) { this.secret = this._account_secret(src); this.tx_json.TransactionType = 'PasswordSet'; - this.tx_json.AuthorizedKey = authorized_key; + this.tx_json.RegularKey = authorized_key; this.tx_json.Generator = generator; this.tx_json.PublicKey = public_key; this.tx_json.Signature = signature; @@ -1412,7 +1412,7 @@ Transaction.prototype.wallet_add = function (src, amount, authorized_key, public this.secret = this._account_secret(src); this.tx_json.TransactionType = 'WalletAdd'; this.tx_json.Amount = Amount.json_rewrite(amount); - this.tx_json.AuthorizedKey = authorized_key; + this.tx_json.RegularKey = authorized_key; this.tx_json.PublicKey = public_key; this.tx_json.Signature = signature; diff --git a/test/config.js b/test/config.js index 6a693172d7..4038f93da8 100644 --- a/test/config.js +++ b/test/config.js @@ -5,7 +5,8 @@ var path = require("path"); // Where to find the binary. -exports.rippled = path.join(process.cwd(), "build/rippled"); +//exports.rippled = path.join(process.cwd(), "newcoin_master"); +exports.rippled = path.join(process.cwd(), "Debug/newcoin"); exports.server_default = "alpha"; diff --git a/test/send-test.js b/test/send-test.js index 5383c2365e..5bcd6c6c78 100644 --- a/test/send-test.js +++ b/test/send-test.js @@ -15,8 +15,9 @@ var serverDelay = 1500; buster.testRunner.timeout = 5000; +/* buster.testCase("Simple", { - 'setUp' : testutils.build_setup({no_server: true}), + 'setUp' : testutils.build_setup({no_server: true}), // 'tearDown' : testutils.build_teardown(), "simple." : @@ -35,13 +36,13 @@ buster.testCase("Simple", { }).submit(); } - }); + }); */ buster.testCase("Sending", { 'setUp' : testutils.build_setup(), 'tearDown' : testutils.build_teardown(), - "=> send XRP to non-existent account without create." : + "send XRP to non-existent account without create." : function (done) { var self = this; var ledgers = 20; @@ -51,11 +52,8 @@ buster.testCase("Sending", { .payment('root', 'alice', "10000") .on('success', function (r) { // Transaction sent. - // buster.assert(false, "Succeded."); - // done(); - buster.assert.equals(r.result, 'terNO_DST'); - console.log("success: %s", JSON.stringify(r)); - done(); + + // console.log("success: %s", JSON.stringify(r)); }) .on('pending', function() { // Moving ledgers along. @@ -79,11 +77,11 @@ buster.testCase("Sending", { }) .on('proposed', function (m) { // Transaction got an error. - console.log("proposed: %s", JSON.stringify(m)); + // console.log("proposed: %s", JSON.stringify(m)); buster.assert.equals(m.result, 'terNO_DST'); - //done(); - got_proposed = true; + + got_proposed = true; self.remote.ledger_accept(); // Move it along. }) @@ -97,7 +95,6 @@ buster.testCase("Sending", { // console.log("error: %s", m); buster.assert(false); - done(); }) .submit(); }, @@ -108,7 +105,7 @@ buster.testCase("Sending", { this.remote.transaction() .ripple_line_set("root", "100/USD/alice") .on('proposed', function (m) { - console.log("proposed: %s", JSON.stringify(m)); + //console.log("proposed: %s", JSON.stringify(m)); buster.assert.equals(m.result, 'terNO_DST'); @@ -116,7 +113,7 @@ buster.testCase("Sending", { }) .submit(); }, -/* + "credit_limit" : function (done) { var self = this; @@ -259,7 +256,7 @@ buster.testCase("Sending", { buster.refute(error, self.what); done(); }); - },*/ + }, }); // XXX In the future add ledger_accept after partial retry is implemented in the server. @@ -267,7 +264,7 @@ buster.testCase("Sending future", { 'setUp' : testutils.build_setup(), 'tearDown' : testutils.build_teardown(), - "direct ripple" : + "=> direct ripple" : function (done) { var self = this; diff --git a/test/testutils.js b/test/testutils.js index 1fc4246196..008c28e531 100644 --- a/test/testutils.js +++ b/test/testutils.js @@ -22,7 +22,7 @@ var account_dump = function (remote, account, callback) { .ledger_hash(remote.ledger_hash()) .account_root("root") .on('success', function (r) { - console.log("account_root: %s", JSON.stringify(r, undefined, 2)); + //console.log("account_root: %s", JSON.stringify(r, undefined, 2)); callback(); })