fix typo ’transaction‘

This commit is contained in:
yjjnls 2019-03-09 15:25:14 +08:00
parent 05a373e36b
commit 33af66d19c
3 changed files with 6 additions and 6 deletions

View File

@ -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
}

View File

@ -3,7 +3,7 @@
var MessageType = {
Connection: 0,
Block: 1,
Transcation: 2,
Transaction: 2,
PrePrepare: 3,
Prepare: 4,
Commit: 5

View File

@ -1,6 +1,6 @@
'use strict';
class Transcation {
class Transaction {
constructor() {
}
@ -10,4 +10,4 @@ class Transcation {
}
}
module.exports = Transcation;
module.exports = Transaction;