mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
dev: cleanup comments
This commit is contained in:
parent
868dc81c8a
commit
4be5477f64
4 changed files with 2 additions and 11 deletions
|
|
@ -1118,10 +1118,6 @@ func (c *Bor) CommitStates(
|
|||
chain chainContext,
|
||||
) error {
|
||||
number := header.Number.Uint64()
|
||||
if number < c.config.Sprint {
|
||||
return errors.New("Requested to commit states too soon")
|
||||
}
|
||||
|
||||
lastSync, err := c.genesisContractsClient.LastStateSyncTime(number - 1)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ package bortest
|
|||
import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
// "encoding/json"
|
||||
// "fmt"
|
||||
"math/big"
|
||||
"testing"
|
||||
|
||||
|
|
@ -165,7 +163,7 @@ func getMockedHeimdallClient(t *testing.T) (*mocks.IHeimdallClient, *bor.Heimdal
|
|||
h := &mocks.IHeimdallClient{}
|
||||
h.On("FetchWithRetry", "bor", "span", "1").Return(res, nil)
|
||||
|
||||
res = zeroResultPayload(t)
|
||||
res = stateSyncEventsPayload(t)
|
||||
// query := fmt.Sprintf("clerk/event-record/list?from-time=%d&to-time=%d&page=1&limit=50", 1, 1589709047)
|
||||
h.On("FetchWithRetry", mock.AnythingOfType("string")).Return(res, nil)
|
||||
return h, heimdallSpan
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ func sign(t *testing.T, header *types.Header, signer []byte) {
|
|||
copy(header.Extra[len(header.Extra)-extraSeal:], sig)
|
||||
}
|
||||
|
||||
func zeroResultPayload(t *testing.T) *bor.ResponseWithHeight {
|
||||
func stateSyncEventsPayload(t *testing.T) *bor.ResponseWithHeight {
|
||||
stateData, err := ioutil.ReadFile("states.json")
|
||||
if err != nil {
|
||||
t.Fatalf("%s", err)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import (
|
|||
"math"
|
||||
"math/big"
|
||||
|
||||
// "math/big"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
|
@ -65,8 +64,6 @@ func (gc *GenesisContractsClient) CommitState(
|
|||
method := "commitState"
|
||||
t := event.Time.Unix()
|
||||
data, err := gc.stateReceiverABI.Pack(method, recordBytes, big.NewInt(0).SetInt64(t))
|
||||
// t, err := time.Parse(event.Time, time.RFC3339)
|
||||
// data, err := gc.stateReceiverABI.Pack(method, recordBytes, t.Unix())
|
||||
if err != nil {
|
||||
log.Error("Unable to pack tx for commitState", "error", err)
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in a new issue