Создание нового объекта транзакции для блокчейна
Blockchain.prototype.createNewTransaction = function(amount, sender, recipient) {
const NewTransaction = {
amount : amount,
sender : sender,
recipient : recipient
};
this.pendingTransactions.push(NewTransaction);
return this.getLastBlock()['index'] +1;
}
Outrageous Ostrich