(ctx context.Context, b *legacy.Block, s *state.Snapshot, prevBlock *legacy.Block)
| 86 | } |
| 87 | |
| 88 | func (g *Generator) commitBlock(ctx context.Context, b *legacy.Block, s *state.Snapshot, prevBlock *legacy.Block) error { |
| 89 | err := g.getAndAddBlockSignatures(ctx, b, prevBlock) |
| 90 | if err != nil { |
| 91 | return errors.Wrap(err, "sign") |
| 92 | } |
| 93 | |
| 94 | err = g.chain.CommitAppliedBlock(ctx, b, s) |
| 95 | if err != nil { |
| 96 | return errors.Wrap(err, "commit") |
| 97 | } |
| 98 | return nil |
| 99 | } |
| 100 | |
| 101 | func (g *Generator) getAndAddBlockSignatures(ctx context.Context, b, prevBlock *legacy.Block) error { |
| 102 | if prevBlock == nil && b.Height == 1 { |
no test coverage detected