Throw an error when Amount or Fee contains a decimal (Fix #31)

Thanks to @jwbusch for review
This commit is contained in:
Elliot Lee
2019-07-26 16:53:25 -07:00
parent b775a6f3c8
commit da5edb0b3b
15 changed files with 413 additions and 162 deletions

View File

@@ -9,11 +9,11 @@ describe('Ledger Hashes', function() {
const ledger = loadFixture(ledgerFixture);
it('computes correct account state hash', function() {
assert.equal(accountStateHash(ledger.accountState).toHex(),
ledger.account_hash);
ledger.account_hash);
});
it('computes correct transaction tree hash', function() {
assert.equal(transactionTreeHash(ledger.transactions).toHex(),
ledger.transaction_hash);
ledger.transaction_hash);
});
it('computes correct ledger header hash', function() {
assert.equal(ledgerHash(ledger).toHex(), ledger.hash);