Compare commits

..

2 Commits

Author SHA1 Message Date
Nik Bougalis
232693419a Set version to 0.27.3-sp1 2015-03-11 10:26:39 -07:00
Nicholas Dudfield
ed66b951c6 Fix testutils.create_accounts
* Don't call ledger_wait inside parallel async loop
2015-03-11 10:25:27 -07:00
3 changed files with 28 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
Name: rippled
Version: 0.27.3
Version: 0.27.3-sp1
Release: 1%{?dist}
Summary: Ripple peer-to-peer network daemon

View File

@@ -35,7 +35,7 @@ char const* getRawVersionString ()
//
// The build version number (edit this for each release)
//
"0.27.3"
"0.27.3-sp1"
//
// Must follow the format described here:
//

View File

@@ -213,7 +213,7 @@ function account_dump(remote, account, callback) {
// get closed ledger hash
// get account root
// construct a json result
};
}
function set_account_flag(remote, account, options, callback) {
if (typeof options === 'number') {
@@ -224,7 +224,9 @@ function set_account_flag(remote, account, options, callback) {
account: account
}, options));
submit_transaction(tx, callback);
// submit_transaction(tx, callback);
tx.submit();
tx.once('proposed', function(){callback();});
}
exports.fund_account =
@@ -259,7 +261,6 @@ function(remote, src, account, amount, options, callback) {
options = {};
}
options = extend({default_rippling: true}, options);
// Before creating the account, check if it exists in the ledger.
// If it does, regardless of the balance, fail the test, because
@@ -272,28 +273,19 @@ function(remote, src, account, amount, options, callback) {
});
info.once('error', function(result) {
var isNotFoundError = result.error === 'remoteError'
&& result.remote.error === 'actNotFound';
var isNotFoundError = result.error === 'remoteError' &&
result.remote.error === 'actNotFound';
if (!isNotFoundError) {
return callback(result);
}
// rippled indicated the account does not exist. Create it by funding it.
fund_account(remote, src, account, amount, function(err) {
if (err) {
callback(err);
} else if (!options.default_rippling) {
callback();
} else {
// Set default rippling on trustlines for account
set_account_flag(remote, account, 8, callback);
}
});
fund_account(remote, src, account, amount, callback);
});
info.request();
}
};
function create_accounts(remote, src, amount, accounts, options, callback) {
if (typeof options === 'function') {
@@ -305,8 +297,24 @@ function create_accounts(remote, src, amount, accounts, options, callback) {
async.forEach(accounts, function (account, callback) {
create_account(remote, src, account, amount, options, callback);
}, callback);
};
}, function(){
options = extend({default_rippling: true}, options);
// If we don't want to set default rippling, then bail, otherwise
if (!options.default_rippling) {
return callback();
}
// close the ledger, so all the accounts always exist, then
remote.ledger_accept(function(){
// set the default rippling flag, on all the accounts
async.forEach(accounts, function(account, callback){
set_account_flag(remote, account, 8, callback);
}, function(){
remote.ledger_accept(function(){callback();});
});
});
});
}
function credit_limit(remote, src, amount, callback) {
assert.strictEqual(arguments.length, 4);