UT: Test offer counts.

This commit is contained in:
Arthur Britto
2012-12-14 21:21:27 -08:00
parent 12a4ce88ec
commit fd0bd1433f
3 changed files with 83 additions and 1 deletions

View File

@@ -622,7 +622,6 @@ Remote.prototype.request_ledger_entry = function (type) {
// console.log('request_ledger_entry: caught');
if (self._ledger_hash) {
// A specific ledger is requested.
@@ -913,6 +912,19 @@ Remote.prototype.request_account_balance = function (account, current) {
});
};
// Return a request to emit the owner count.
Remote.prototype.request_owner_count = function (account, current) {
var request = this.request_ledger_entry('account_root');
return request
.account_root(account)
.ledger_choose(current)
.on('success', function (message) {
// If the caller also waits for 'success', they might run before this.
request.emit('owner_count', message.node.OwnerCount);
});
};
// Return the next account sequence if possible.
// <-- undefined or Sequence
Remote.prototype.account_seq = function (account, advance) {