Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typo #294

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/infra/basic/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/infra/observer/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/infra/observer/block_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/infra/observer/commitObserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pkg/infra/observer/endorsementObersver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/infra/trafficGenerator/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/infra/trafficGenerator/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/infra/trafficGenerator/proposer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading