mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 14:21:14 +00:00
Merge branch main into feature/abci++ppp
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
@@ -126,7 +126,7 @@ func GenesisDocFromJSON(jsonBlob []byte) (*GenesisDoc, error) {
|
||||
|
||||
// GenesisDocFromFile reads JSON data from a file and unmarshalls it into a GenesisDoc.
|
||||
func GenesisDocFromFile(genDocFile string) (*GenesisDoc, error) {
|
||||
jsonBlob, err := ioutil.ReadFile(genDocFile)
|
||||
jsonBlob, err := os.ReadFile(genDocFile)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("couldn't read GenesisDoc file: %w", err)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
@@ -122,7 +121,7 @@ func TestGenesisGood(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGenesisSaveAs(t *testing.T) {
|
||||
tmpfile, err := ioutil.TempFile("", "genesis")
|
||||
tmpfile, err := os.CreateTemp("", "genesis")
|
||||
require.NoError(t, err)
|
||||
defer os.Remove(tmpfile.Name())
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -57,7 +57,7 @@ func TestBasicPartSet(t *testing.T) {
|
||||
|
||||
// Reconstruct data, assert that they are equal.
|
||||
data2Reader := partSet2.GetReader()
|
||||
data2, err := ioutil.ReadAll(data2Reader)
|
||||
data2, err := io.ReadAll(data2Reader)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, data, data2)
|
||||
|
||||
@@ -46,9 +46,7 @@ func (a ABCIResults) toByteSlices() [][]byte {
|
||||
// ResponseDeliverTx and returns another ResponseDeliverTx.
|
||||
func deterministicResponseDeliverTx(response *abci.ResponseDeliverTx) *abci.ResponseDeliverTx {
|
||||
return &abci.ResponseDeliverTx{
|
||||
Code: response.Code,
|
||||
Data: response.Data,
|
||||
GasWanted: response.GasWanted,
|
||||
GasUsed: response.GasUsed,
|
||||
Code: response.Code,
|
||||
Data: response.Data,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user