Skip to content
Draft
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 nil/internal/consensus/ibft/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ type ibftLogger struct {
}

func (l *ibftLogger) Info(msg string, args ...any) {
l.logger.Info().Fields(args).Msg(msg)
l.logger.Trace().Fields(args).Msg(msg)
}

func (l *ibftLogger) Debug(msg string, args ...any) {
l.logger.Debug().Fields(args).Msg(msg)
l.logger.Trace().Fields(args).Msg(msg)
}

func (l *ibftLogger) Error(msg string, args ...any) {
Expand Down
12 changes: 11 additions & 1 deletion nil/internal/execution/postprocess.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package execution

import (
"bytes"
"errors"
"fmt"

"github.com/NilFoundation/nil/nil/common"
"github.com/NilFoundation/nil/nil/common/assert"
"github.com/NilFoundation/nil/nil/common/check"
"github.com/NilFoundation/nil/nil/internal/db"
"github.com/NilFoundation/nil/nil/internal/types"
)
Expand Down Expand Up @@ -43,8 +45,16 @@ func (pp *blockPostprocessor) fillLastBlockTable() error {
}

func (pp *blockPostprocessor) fillBlockHashByNumberIndex() error {
key := pp.blockResult.Block.Id.Bytes()
value := pp.blockResult.BlockHash.Bytes()

present, err := pp.tx.GetFromShard(pp.shardId, db.BlockHashByNumberIndex, key)
check.PanicIfNot(err == nil || errors.Is(err, db.ErrKeyNotFound))
check.PanicIfNotf(err != nil || bytes.Equal(value, present), "block hash by number index already exists: %x != %x",
present, value)

return pp.tx.PutToShard(
pp.shardId, db.BlockHashByNumberIndex, pp.blockResult.Block.Id.Bytes(), pp.blockResult.BlockHash.Bytes())
pp.shardId, db.BlockHashByNumberIndex, key, value)
}

func (pp *blockPostprocessor) fillBlockHashAndTransactionIndexByTransactionHash() error {
Expand Down
2 changes: 1 addition & 1 deletion nil/services/nilservice/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func startRpcServer(
httpConfig := &httpcfg.HttpCfg{
HttpURL: addr,
HttpCompression: true,
TraceRequests: true,
TraceRequests: false,
HTTPTimeouts: httpcfg.DefaultHTTPTimeouts,
HttpCORSDomain: []string{"*"},
KeepHeaders: []string{"Client-Version", "Client-Type", "X-UID"},
Expand Down
Loading