Task You have three parameters, two arrays representing initialBalances and transactions and a third integer representing the blockSize. Create a blockchain that includes all valid pending transactions in the order in which they are given. Provide functionality to get the balance of a specific account on the blockchain.
- init(initialBalances, transactions, blockSize) => A function that initializes the blockchain.
- getAccountBalance(accountIndex) => returns the account balance of a specific account.
node
const Blockchain = require('./blockchain');
const blockchain = new Blockchain();
blockchain.init(balances, transactions, blockSize);
blockchain.getAccountBalance(index);
npm test ./blockchain.test.js