Merge branch main into feature/abci++ppp

This commit is contained in:
Sergio Mena
2022-08-12 13:59:19 +02:00
517 changed files with 61642 additions and 20689 deletions

View File

@@ -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)
}

View File

@@ -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())

View File

@@ -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)

View File

@@ -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,
}
}