mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +00:00
build: add imports for go generate tools (#24682)
This commit is contained in:
parent
537dc5e6fb
commit
588f61661c
19 changed files with 22 additions and 18 deletions
|
|
@ -22,6 +22,7 @@ package tools
|
|||
import (
|
||||
// Tool imports for go:generate.
|
||||
_ "github.com/fjl/gencodec"
|
||||
_ "github.com/kevinburke/go-bindata/go-bindata"
|
||||
_ "golang.org/x/tools/cmd/stringer"
|
||||
_ "google.golang.org/protobuf/cmd/protoc-gen-go"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
// faucet is a Ether faucet backed by a light client.
|
||||
package main
|
||||
|
||||
//go:generate go-bindata -nometadata -o website.go faucet.html
|
||||
//go:generate go run github.com/kevinburke/go-bindata/go-bindata -nometadata -o website.go faucet.html
|
||||
//go:generate gofmt -w -s website.go
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ import (
|
|||
"github.com/XinFinOrg/XDPoSChain/rlp"
|
||||
)
|
||||
|
||||
//go:generate gencodec -type Genesis -field-override genesisSpecMarshaling -out gen_genesis.go
|
||||
//go:generate gencodec -type GenesisAccount -field-override genesisAccountMarshaling -out gen_genesis_account.go
|
||||
//go:generate go run github.com/fjl/gencodec -type Genesis -field-override genesisSpecMarshaling -out gen_genesis.go
|
||||
//go:generate go run github.com/fjl/gencodec -type GenesisAccount -field-override genesisAccountMarshaling -out gen_genesis_account.go
|
||||
|
||||
var errGenesisNoConfig = errors.New("genesis has no chain configuration")
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ func (n *BlockNonce) UnmarshalText(input []byte) error {
|
|||
return hexutil.UnmarshalFixedText("BlockNonce", input, n[:])
|
||||
}
|
||||
|
||||
//go:generate gencodec -type Header -field-override headerMarshaling -out gen_header_json.go
|
||||
//go:generate go run github.com/fjl/gencodec -type Header -field-override headerMarshaling -out gen_header_json.go
|
||||
|
||||
// Header represents a block header in the Ethereum blockchain.
|
||||
type Header struct {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/XinFinOrg/XDPoSChain/rlp"
|
||||
)
|
||||
|
||||
//go:generate gencodec -type Log -field-override logMarshaling -out gen_log_json.go
|
||||
//go:generate go run github.com/fjl/gencodec -type Log -field-override logMarshaling -out gen_log_json.go
|
||||
|
||||
// Log represents a contract log event. These events are generated by the LOG opcode and
|
||||
// stored/indexed by the node.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import (
|
|||
"github.com/XinFinOrg/XDPoSChain/rlp"
|
||||
)
|
||||
|
||||
//go:generate gencodec -type Receipt -field-override receiptMarshaling -out gen_receipt_json.go
|
||||
//go:generate go run github.com/fjl/gencodec -type Receipt -field-override receiptMarshaling -out gen_receipt_json.go
|
||||
|
||||
var (
|
||||
receiptStatusFailedRLP = []byte{}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/XinFinOrg/XDPoSChain/common"
|
||||
)
|
||||
|
||||
//go:generate gencodec -type AccessTuple -out gen_access_tuple.go
|
||||
//go:generate go run github.com/fjl/gencodec -type AccessTuple -out gen_access_tuple.go
|
||||
|
||||
// AccessList is an EIP-2930 access list.
|
||||
type AccessList []AccessTuple
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ type LogConfig struct {
|
|||
Overrides *params.ChainConfig `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
//go:generate gencodec -type StructLog -field-override structLogMarshaling -out gen_structlog.go
|
||||
//go:generate go run github.com/fjl/gencodec -type StructLog -field-override structLogMarshaling -out gen_structlog.go
|
||||
|
||||
// StructLog is emitted to the EVM each cycle and lists information about the current internal state
|
||||
// prior to the execution of the statement.
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ func init() {
|
|||
}
|
||||
}
|
||||
|
||||
//go:generate gencodec -type Config -field-override configMarshaling -formats toml -out gen_config.go
|
||||
//go:generate go run github.com/fjl/gencodec -type Config -field-override configMarshaling -formats toml -out gen_config.go
|
||||
|
||||
// Config contains configuration options for of the ETH and LES protocols.
|
||||
type Config struct {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//go:generate go-bindata -nometadata -o assets.go -pkg tracers -ignore tracers.go -ignore assets.go ./...
|
||||
//go:generate go run github.com/kevinburke/go-bindata/go-bindata -nometadata -o assets.go -pkg tracers -ignore tracers.go -ignore assets.go ./...
|
||||
//go:generate gofmt -s -w assets.go
|
||||
|
||||
// Package tracers contains the actual JavaScript tracer assets.
|
||||
|
|
|
|||
1
go.mod
1
go.mod
|
|
@ -53,6 +53,7 @@ require (
|
|||
github.com/go-yaml/yaml v2.1.0+incompatible
|
||||
github.com/influxdata/influxdb-client-go/v2 v2.4.0
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c
|
||||
github.com/kevinburke/go-bindata v3.23.0+incompatible
|
||||
github.com/kylelemons/godebug v1.1.0
|
||||
github.com/mattn/go-isatty v0.0.17
|
||||
github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7
|
||||
|
|
|
|||
2
go.sum
2
go.sum
|
|
@ -111,6 +111,8 @@ github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4d
|
|||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/karalabe/hid v1.0.0 h1:+/CIMNXhSU/zIJgnIvBD2nKHxS/bnRHhhs9xBryLpPo=
|
||||
github.com/karalabe/hid v1.0.0/go.mod h1:Vr51f8rUOLYrfrWDFlV12GGQgM5AT8sVh+2fY4MPeu8=
|
||||
github.com/kevinburke/go-bindata v3.23.0+incompatible h1:rqNOXZlqrYhMVVAsQx8wuc+LaA73YcfbQ407wAykyS8=
|
||||
github.com/kevinburke/go-bindata v3.23.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM=
|
||||
github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4=
|
||||
github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@
|
|||
// Package deps contains the console JavaScript dependencies Go embedded.
|
||||
package deps
|
||||
|
||||
//go:generate go-bindata -nometadata -pkg deps -o bindata.go bignumber.js web3.js
|
||||
//go:generate go run github.com/kevinburke/go-bindata/go-bindata -nometadata -pkg deps -o bindata.go bignumber.js web3.js
|
||||
//go:generate gofmt -w -s bindata.go
|
||||
|
|
|
|||
|
|
@ -824,7 +824,7 @@ func (q *findnodeQuery) start(net *Network) bool {
|
|||
|
||||
type nodeEvent uint
|
||||
|
||||
//go:generate stringer -type=nodeEvent
|
||||
//go:generate go run golang.org/x/tools/cmd/stringer -type=nodeEvent
|
||||
|
||||
const (
|
||||
invalidEvent nodeEvent = iota // zero is reserved
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ type btBlock struct {
|
|||
UncleHeaders []*btHeader
|
||||
}
|
||||
|
||||
//go:generate gencodec -type btHeader -field-override btHeaderMarshaling -out gen_btheader.go
|
||||
//go:generate go run github.com/fjl/gencodec -type btHeader -field-override btHeaderMarshaling -out gen_btheader.go
|
||||
|
||||
type btHeader struct {
|
||||
Bloom types.Bloom
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import (
|
|||
"github.com/XinFinOrg/XDPoSChain/params"
|
||||
)
|
||||
|
||||
//go:generate gencodec -type DifficultyTest -field-override difficultyTestMarshaling -out gen_difficultytest.go
|
||||
//go:generate go run github.com/fjl/gencodec -type DifficultyTest -field-override difficultyTestMarshaling -out gen_difficultytest.go
|
||||
|
||||
type DifficultyTest struct {
|
||||
ParentTimestamp *big.Int `json:"parentTimestamp"`
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ type stPostState struct {
|
|||
}
|
||||
}
|
||||
|
||||
//go:generate gencodec -type stEnv -field-override stEnvMarshaling -out gen_stenv.go
|
||||
//go:generate go run github.com/fjl/gencodec -type stEnv -field-override stEnvMarshaling -out gen_stenv.go
|
||||
|
||||
type stEnv struct {
|
||||
Coinbase common.Address `json:"currentCoinbase" gencodec:"required"`
|
||||
|
|
@ -93,7 +93,7 @@ type stEnvMarshaling struct {
|
|||
BaseFee *math.HexOrDecimal256
|
||||
}
|
||||
|
||||
//go:generate gencodec -type stTransaction -field-override stTransactionMarshaling -out gen_sttransaction.go
|
||||
//go:generate go run github.com/fjl/gencodec -type stTransaction -field-override stTransactionMarshaling -out gen_sttransaction.go
|
||||
|
||||
type stTransaction struct {
|
||||
GasPrice *big.Int `json:"gasPrice"`
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ type ttJSON struct {
|
|||
Transaction *ttTransaction `json:"transaction"`
|
||||
}
|
||||
|
||||
//go:generate gencodec -type ttTransaction -field-override ttTransactionMarshaling -out gen_tttransaction.go
|
||||
//go:generate go run github.com/fjl/gencodec -type ttTransaction -field-override ttTransactionMarshaling -out gen_tttransaction.go
|
||||
|
||||
type ttTransaction struct {
|
||||
Data []byte `gencodec:"required"`
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ type vmJSON struct {
|
|||
PostStateRoot common.Hash `json:"postStateRoot"`
|
||||
}
|
||||
|
||||
//go:generate gencodec -type vmExec -field-override vmExecMarshaling -out gen_vmexec.go
|
||||
//go:generate go run github.com/fjl/gencodec -type vmExec -field-override vmExecMarshaling -out gen_vmexec.go
|
||||
|
||||
type vmExec struct {
|
||||
Address common.Address `json:"address" gencodec:"required"`
|
||||
|
|
|
|||
Loading…
Reference in a new issue