mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
style: yarn format (run prettier) (#1327)
This commit is contained in:
@@ -6,7 +6,7 @@ import * as hashes from '../src/common/hashes'
|
||||
* Expects a corresponding ledger dump in $repo/test/fixtures/rippled folder
|
||||
*/
|
||||
function createLedgerTest(ledgerIndex: number) {
|
||||
describe(String(ledgerIndex), function() {
|
||||
describe(String(ledgerIndex), function () {
|
||||
var path =
|
||||
__dirname + '/fixtures/rippled/ledger-full-' + ledgerIndex + '.json'
|
||||
|
||||
@@ -18,14 +18,14 @@ function createLedgerTest(ledgerIndex: number) {
|
||||
ledgerJSON.accountState.length > 0
|
||||
|
||||
if (hasAccounts) {
|
||||
it('has account_hash of ' + ledgerJSON.account_hash, function() {
|
||||
it('has account_hash of ' + ledgerJSON.account_hash, function () {
|
||||
assert.equal(
|
||||
ledgerJSON.account_hash,
|
||||
hashes.computeStateTreeHash(ledgerJSON.accountState)
|
||||
)
|
||||
})
|
||||
}
|
||||
it('has transaction_hash of ' + ledgerJSON.transaction_hash, function() {
|
||||
it('has transaction_hash of ' + ledgerJSON.transaction_hash, function () {
|
||||
assert.equal(
|
||||
ledgerJSON.transaction_hash,
|
||||
hashes.computeTransactionTreeHash(ledgerJSON.transactions)
|
||||
@@ -34,7 +34,7 @@ function createLedgerTest(ledgerIndex: number) {
|
||||
})
|
||||
}
|
||||
|
||||
describe('Ledger', function() {
|
||||
describe('Ledger', function () {
|
||||
// This is the first recorded ledger with a non empty transaction set
|
||||
createLedgerTest(38129)
|
||||
// Because, why not.
|
||||
@@ -42,8 +42,8 @@ describe('Ledger', function() {
|
||||
// 1311 AffectedNodes, no accounts
|
||||
createLedgerTest(7501326)
|
||||
|
||||
describe('calcAccountRootEntryHash', function() {
|
||||
it('will calculate the AccountRoot entry hash for rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', function() {
|
||||
describe('calcAccountRootEntryHash', function () {
|
||||
it('will calculate the AccountRoot entry hash for rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', function () {
|
||||
var account = 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh'
|
||||
var expectedEntryHash =
|
||||
'2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8'
|
||||
@@ -53,8 +53,8 @@ describe('Ledger', function() {
|
||||
})
|
||||
})
|
||||
|
||||
describe('calcRippleStateEntryHash', function() {
|
||||
it('will calculate the RippleState entry hash for rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh and rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY in USD', function() {
|
||||
describe('calcRippleStateEntryHash', function () {
|
||||
it('will calculate the RippleState entry hash for rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh and rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY in USD', function () {
|
||||
var account1 = 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh'
|
||||
var account2 = 'rB5TihdPbKgMrkFqrqUC3yLdE8hhv4BdeY'
|
||||
var currency = 'USD'
|
||||
@@ -76,7 +76,7 @@ describe('Ledger', function() {
|
||||
assert.equal(actualEntryHash2, expectedEntryHash)
|
||||
})
|
||||
|
||||
it('will calculate the RippleState entry hash for r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV and rUAMuQTfVhbfqUDuro7zzy4jj4Wq57MPTj in UAM', function() {
|
||||
it('will calculate the RippleState entry hash for r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV and rUAMuQTfVhbfqUDuro7zzy4jj4Wq57MPTj in UAM', function () {
|
||||
var account1 = 'r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV'
|
||||
var account2 = 'rUAMuQTfVhbfqUDuro7zzy4jj4Wq57MPTj'
|
||||
var currency = 'UAM'
|
||||
@@ -99,8 +99,8 @@ describe('Ledger', function() {
|
||||
})
|
||||
})
|
||||
|
||||
describe('calcOfferEntryHash', function() {
|
||||
it('will calculate the Offer entry hash for r32UufnaCGL82HubijgJGDmdE5hac7ZvLw, sequence 137', function() {
|
||||
describe('calcOfferEntryHash', function () {
|
||||
it('will calculate the Offer entry hash for r32UufnaCGL82HubijgJGDmdE5hac7ZvLw, sequence 137', function () {
|
||||
var account = 'r32UufnaCGL82HubijgJGDmdE5hac7ZvLw'
|
||||
var sequence = 137
|
||||
var expectedEntryHash =
|
||||
@@ -111,8 +111,8 @@ describe('Ledger', function() {
|
||||
})
|
||||
})
|
||||
|
||||
describe('computeSignerListLedgerObjectID', function() {
|
||||
it('will calculate the SignerList index for r32UufnaCGL82HubijgJGDmdE5hac7ZvLw', function() {
|
||||
describe('computeSignerListLedgerObjectID', function () {
|
||||
it('will calculate the SignerList index for r32UufnaCGL82HubijgJGDmdE5hac7ZvLw', function () {
|
||||
var account = 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh'
|
||||
var expectedEntryHash =
|
||||
'778365D5180F5DF3016817D1F318527AD7410D83F8636CF48C43E8AF72AB49BF'
|
||||
@@ -121,8 +121,8 @@ describe('Ledger', function() {
|
||||
})
|
||||
})
|
||||
|
||||
describe('calcEscrowEntryHash', function() {
|
||||
it('will calculate the Escrow entry hash for rDx69ebzbowuqztksVDmZXjizTd12BVr4x, sequence 84', function() {
|
||||
describe('calcEscrowEntryHash', function () {
|
||||
it('will calculate the Escrow entry hash for rDx69ebzbowuqztksVDmZXjizTd12BVr4x, sequence 84', function () {
|
||||
var account = 'rDx69ebzbowuqztksVDmZXjizTd12BVr4x'
|
||||
var sequence = 84
|
||||
var expectedEntryHash =
|
||||
@@ -133,8 +133,8 @@ describe('Ledger', function() {
|
||||
})
|
||||
})
|
||||
|
||||
describe('calcPaymentChannelEntryHash', function() {
|
||||
it('will calculate the PaymentChannel entry hash for rDx69ebzbowuqztksVDmZXjizTd12BVr4x and rLFtVprxUEfsH54eCWKsZrEQzMDsx1wqso, sequence 82', function() {
|
||||
describe('calcPaymentChannelEntryHash', function () {
|
||||
it('will calculate the PaymentChannel entry hash for rDx69ebzbowuqztksVDmZXjizTd12BVr4x and rLFtVprxUEfsH54eCWKsZrEQzMDsx1wqso, sequence 82', function () {
|
||||
var account = 'rDx69ebzbowuqztksVDmZXjizTd12BVr4x'
|
||||
var dstAccount = 'rLFtVprxUEfsH54eCWKsZrEQzMDsx1wqso'
|
||||
var sequence = 82
|
||||
|
||||
Reference in New Issue
Block a user