diff --git a/pkg/infra/basic/logger.go b/pkg/infra/basic/logger.go index ed434ffa..f6cfdc89 100644 --- a/pkg/infra/basic/logger.go +++ b/pkg/infra/basic/logger.go @@ -42,8 +42,8 @@ func Init(service string) (opentracing.Tracer, io.Closer) { } const ( - TRANSCATION = "TRANSCATION" - TRANSCATIONSTART = "TRANSCATIONSTART" + TRANSACTION = "TRANSACTION" + TRANSACTIONSTART = "TRANSACTIONSTART" SIGN_PROPOSAL = "SIGN_PROPOSAL" ENDORSEMENT = "ENDORSEMENT" ENDORSEMENT_AT_PEER = "ENDORSEMENT_AT_PEER" diff --git a/pkg/infra/observer/benchmark_test.go b/pkg/infra/observer/benchmark_test.go index d10ba0b0..5ff8c282 100644 --- a/pkg/infra/observer/benchmark_test.go +++ b/pkg/infra/observer/benchmark_test.go @@ -61,7 +61,7 @@ func benchmarkNPeer(concurrency int, b *testing.B) { go func() { for i := 0; i < b.N; i++ { uuid, _ := uuid.NewRandom() - span := opentracing.GlobalTracer().StartSpan("start transcation process", opentracing.Tag{Key: "txid", Value: uuid.String()}) + span := opentracing.GlobalTracer().StartSpan("start transaction process", opentracing.Tag{Key: "txid", Value: uuid.String()}) ed_span := opentracing.GlobalTracer().StartSpan("endorsement", opentracing.Tag{Key: "txid", Value: uuid.String()}) data := &basic.Elements{SignedProp: &peer.SignedProposal{}, TxId: uuid.String(), Span: span, EndorsementSpan: ed_span} for _, s := range signeds { diff --git a/pkg/infra/observer/block_collector.go b/pkg/infra/observer/block_collector.go index 6c26578b..bd188e6b 100644 --- a/pkg/infra/observer/block_collector.go +++ b/pkg/infra/observer/block_collector.go @@ -138,14 +138,14 @@ func (bc *BlockCollector) commit(block *AddressedBlock) { // committed on all peers, remove from registry // todo: logging // end of from peers - // end of transcation creation + // end of transaction creation delete(bc.registry, block.Number) for _, b := range block.FilteredBlock.FilteredTransactions { basic.LogEvent(bc.logger, b.Txid, "CommitAtPeers") tapeSpan := basic.GetGlobalSpan() tapeSpan.FinishWithMap(b.Txid, "", basic.COMMIT_AT_ALL_PEERS) if basic.GetMod() == infra.FULLPROCESS { - tapeSpan.FinishWithMap(b.Txid, "", basic.TRANSCATION) + tapeSpan.FinishWithMap(b.Txid, "", basic.TRANSACTION) } } } diff --git a/pkg/infra/observer/commitObserver.go b/pkg/infra/observer/commitObserver.go index 682e04a1..e8a0712c 100644 --- a/pkg/infra/observer/commitObserver.go +++ b/pkg/infra/observer/commitObserver.go @@ -113,7 +113,7 @@ func (o *CommitObserver) Start() { tapeSpan.FinishWithMap(txID, "", basic.CONSESUS) var span opentracing.Span if basic.GetMod() == infra.FULLPROCESS { - Global_Span := tapeSpan.GetSpan(txID, "", basic.TRANSCATION) + Global_Span := tapeSpan.GetSpan(txID, "", basic.TRANSACTION) span = tapeSpan.SpanIntoMap(txID, "", basic.COMMIT_AT_ALL_PEERS, Global_Span) } else { span = tapeSpan.SpanIntoMap(txID, "", basic.COMMIT_AT_ALL_PEERS, nil) diff --git a/pkg/infra/observer/endorsementObersver.go b/pkg/infra/observer/endorsementObersver.go index 5422e82f..d4308a27 100644 --- a/pkg/infra/observer/endorsementObersver.go +++ b/pkg/infra/observer/endorsementObersver.go @@ -36,7 +36,7 @@ func (o *EndorseObserver) Start() { for { e := <-o.Envs tapeSpan := basic.GetGlobalSpan() - tapeSpan.FinishWithMap(e.TxId, "", basic.TRANSCATIONSTART) + tapeSpan.FinishWithMap(e.TxId, "", basic.TRANSACTIONSTART) i++ fmt.Printf("Time %8.2fs\tTx %6d Processed\n", time.Since(o.Now).Seconds(), i) if o.n > 0 { diff --git a/pkg/infra/trafficGenerator/broadcaster.go b/pkg/infra/trafficGenerator/broadcaster.go index 2217e546..fb957f1f 100644 --- a/pkg/infra/trafficGenerator/broadcaster.go +++ b/pkg/infra/trafficGenerator/broadcaster.go @@ -74,14 +74,14 @@ func (b *Broadcaster) Start(ctx context.Context, envs <-chan *basic.TracingEnvel span.Finish() e.Span.Finish() if basic.GetMod() == infra.FULLPROCESS { - Global_Span := tapeSpan.GetSpan(e.TxId, "", basic.TRANSCATION) + Global_Span := tapeSpan.GetSpan(e.TxId, "", basic.TRANSACTION) tapeSpan.SpanIntoMap(e.TxId, "", basic.CONSESUS, Global_Span) } else { tapeSpan.SpanIntoMap(e.TxId, "", basic.CONSESUS, nil) } e = nil - // end of transcation + // end of transaction case <-ctx.Done(): return } diff --git a/pkg/infra/trafficGenerator/proposal.go b/pkg/infra/trafficGenerator/proposal.go index e92fbf9e..a9679099 100644 --- a/pkg/infra/trafficGenerator/proposal.go +++ b/pkg/infra/trafficGenerator/proposal.go @@ -63,10 +63,10 @@ func CreateProposal(signer infra.Crypto, logger *log.Logger, channel, ccname, ve tapeSpan := basic.GetGlobalSpan() var span opentracing.Span if basic.GetMod() == infra.FULLPROCESS { - Global_Span := tapeSpan.SpanIntoMap(txid, "", basic.TRANSCATION, nil) - span = tapeSpan.MakeSpan(txid, "", basic.TRANSCATIONSTART, Global_Span) + Global_Span := tapeSpan.SpanIntoMap(txid, "", basic.TRANSACTION, nil) + span = tapeSpan.MakeSpan(txid, "", basic.TRANSACTIONSTART, Global_Span) } else { - span = tapeSpan.SpanIntoMap(txid, "", basic.TRANSCATIONSTART, nil) + span = tapeSpan.SpanIntoMap(txid, "", basic.TRANSACTIONSTART, nil) } return &basic.TracingProposal{Proposal: prop, TxId: txid, Span: span}, nil } diff --git a/pkg/infra/trafficGenerator/proposer_test.go b/pkg/infra/trafficGenerator/proposer_test.go index e920764e..30864027 100644 --- a/pkg/infra/trafficGenerator/proposer_test.go +++ b/pkg/infra/trafficGenerator/proposer_test.go @@ -83,7 +83,7 @@ var _ = Describe("Proposer", func() { tracer, closer := basic.Init("test") defer closer.Close() opentracing.SetGlobalTracer(tracer) - span := opentracing.GlobalTracer().StartSpan("start transcation process") + span := opentracing.GlobalTracer().StartSpan("start transaction process") defer span.Finish() peerNum := 2 processed = make(chan *basic.Elements, 10)