mirror of
https://github.com/yjjnls/awesome-blockchain.git
synced 2025-01-12 14:29:25 -05:00
fix typo ’transaction‘
This commit is contained in:
parent
05a373e36b
commit
33af66d19c
@ -4,7 +4,7 @@ var Block = require("./block");
|
||||
const genesis_block = require("./genesis_block.json");
|
||||
var Node = require("./network");
|
||||
var Account = require("./account");
|
||||
var Transcation = require("./transcation");
|
||||
var Transaction = require("./transaction");
|
||||
var Msg = require("./message");
|
||||
var MessageType = require("./message").type;
|
||||
var Promise = require("bluebird");
|
||||
@ -158,7 +158,7 @@ class BlockChain {
|
||||
let tx = block.transcations;
|
||||
for (var i = 0; i < tx.length; ++i) {
|
||||
// todo (check tx is exist and valid)
|
||||
if (!Transcation.verify(tx[i]))
|
||||
if (!Transaction.verify(tx[i]))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -192,7 +192,7 @@ class BlockChain {
|
||||
this.broadcast(msg);
|
||||
}
|
||||
break;
|
||||
case MessageType.Transcation:
|
||||
case MessageType.Transaction:
|
||||
{
|
||||
// check if exist(pending or in chain) verify, store(into pending) and broadcast
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
var MessageType = {
|
||||
Connection: 0,
|
||||
Block: 1,
|
||||
Transcation: 2,
|
||||
Transaction: 2,
|
||||
PrePrepare: 3,
|
||||
Prepare: 4,
|
||||
Commit: 5
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
class Transcation {
|
||||
class Transaction {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
@ -10,4 +10,4 @@ class Transcation {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Transcation;
|
||||
module.exports = Transaction;
|
Loading…
Reference in New Issue
Block a user