Skip to content

Commit 5f4bf8c

Browse files
committed
Pulsechain Ethereum Patch #3
1 parent 5f5a1d5 commit 5f4bf8c

File tree

387 files changed

+9013
-8929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

387 files changed

+9013
-8929
lines changed

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,6 @@ use separate accounts for play and real money. Unless you manually move
115115
accounts, `geth` will by default correctly separate the two networks and will not make any
116116
accounts available between them.*
117117

118-
### Full node on the Rinkeby test network
119-
120-
Go-Pulse also supports connecting to the older proof-of-authority based test network
121-
called [*Rinkeby*](https://www.rinkeby.io) which is operated by members of the community.
122-
123-
```shell
124-
$ geth --rinkeby console
125-
```
126-
127118
### **Full node on PulseChain Testnet V4**
128119

129120
To connect to the PulseChain Testnet V4:

accounts/abi/bind/backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
var (
3030
// ErrNoCode is returned by call and transact operations for which the requested
3131
// recipient contract to operate on does not exist in the state db or does not
32-
// have any code associated with it (i.e. suicided).
32+
// have any code associated with it (i.e. self-destructed).
3333
ErrNoCode = errors.New("no contract code at given address")
3434

3535
// ErrNoPendingState is raised when attempting to perform a pending state action

accounts/abi/bind/backends/simulated.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transa
681681
// Get the last block
682682
block, err := b.blockByHash(ctx, b.pendingBlock.ParentHash())
683683
if err != nil {
684-
return fmt.Errorf("could not fetch parent")
684+
return errors.New("could not fetch parent")
685685
}
686686
// Check transaction validity
687687
signer := types.MakeSigner(b.blockchain.Config(), block.Number(), block.Time())
@@ -815,7 +815,7 @@ func (b *SimulatedBackend) AdjustTime(adjustment time.Duration) error {
815815
// Get the last block
816816
block := b.blockchain.GetBlockByHash(b.pendingBlock.ParentHash())
817817
if block == nil {
818-
return fmt.Errorf("could not find parent")
818+
return errors.New("could not find parent")
819819
}
820820

821821
blocks, _ := core.GenerateChain(b.config, block, ethash.NewFaker(), b.database, 1, func(number int, block *core.BlockGen) {

accounts/abi/bind/backends/simulated_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ func TestAdjustTime(t *testing.T) {
161161
func TestNewAdjustTimeFail(t *testing.T) {
162162
testAddr := crypto.PubkeyToAddress(testKey.PublicKey)
163163
sim := simTestBackend(testAddr)
164+
defer sim.blockchain.Stop()
164165

165166
// Create tx and send
166167
head, _ := sim.HeaderByNumber(context.Background(), nil) // Should be child's, good enough

accounts/abi/bind/template.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ var (
325325
if err != nil {
326326
return *outstruct, err
327327
}
328-
{{range $i, $t := .Normalized.Outputs}}
328+
{{range $i, $t := .Normalized.Outputs}}
329329
outstruct.{{.Name}} = *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}}){{end}}
330330
331331
return *outstruct, err
@@ -335,7 +335,7 @@ var (
335335
}
336336
{{range $i, $t := .Normalized.Outputs}}
337337
out{{$i}} := *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}}){{end}}
338-
338+
339339
return {{range $i, $t := .Normalized.Outputs}}out{{$i}}, {{end}} err
340340
{{end}}
341341
}
@@ -378,7 +378,7 @@ var (
378378
}
379379
{{end}}
380380
381-
{{if .Fallback}}
381+
{{if .Fallback}}
382382
// Fallback is a paid mutator transaction binding the contract fallback function.
383383
//
384384
// Solidity: {{.Fallback.Original.String}}
@@ -392,16 +392,16 @@ var (
392392
func (_{{$contract.Type}} *{{$contract.Type}}Session) Fallback(calldata []byte) (*types.Transaction, error) {
393393
return _{{$contract.Type}}.Contract.Fallback(&_{{$contract.Type}}.TransactOpts, calldata)
394394
}
395-
395+
396396
// Fallback is a paid mutator transaction binding the contract fallback function.
397-
//
397+
//
398398
// Solidity: {{.Fallback.Original.String}}
399399
func (_{{$contract.Type}} *{{$contract.Type}}TransactorSession) Fallback(calldata []byte) (*types.Transaction, error) {
400400
return _{{$contract.Type}}.Contract.Fallback(&_{{$contract.Type}}.TransactOpts, calldata)
401401
}
402402
{{end}}
403403
404-
{{if .Receive}}
404+
{{if .Receive}}
405405
// Receive is a paid mutator transaction binding the contract receive function.
406406
//
407407
// Solidity: {{.Receive.Original.String}}
@@ -415,9 +415,9 @@ var (
415415
func (_{{$contract.Type}} *{{$contract.Type}}Session) Receive() (*types.Transaction, error) {
416416
return _{{$contract.Type}}.Contract.Receive(&_{{$contract.Type}}.TransactOpts)
417417
}
418-
418+
419419
// Receive is a paid mutator transaction binding the contract receive function.
420-
//
420+
//
421421
// Solidity: {{.Receive.Original.String}}
422422
func (_{{$contract.Type}} *{{$contract.Type}}TransactorSession) Receive() (*types.Transaction, error) {
423423
return _{{$contract.Type}}.Contract.Receive(&_{{$contract.Type}}.TransactOpts)

accounts/abi/error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type Error struct {
3232
str string
3333

3434
// Sig contains the string signature according to the ABI spec.
35-
// e.g. error foo(uint32 a, int b) = "foo(uint32,int256)"
35+
// e.g. error foo(uint32 a, int b) = "foo(uint32,int256)"
3636
// Please note that "int" is substitute for its canonical representation "int256"
3737
Sig string
3838

accounts/abi/reflect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func mapArgNamesToStructFields(argNames []string, value reflect.Value) (map[stri
228228
structFieldName := ToCamelCase(argName)
229229

230230
if structFieldName == "" {
231-
return nil, fmt.Errorf("abi: purely underscored output cannot unpack to struct")
231+
return nil, errors.New("abi: purely underscored output cannot unpack to struct")
232232
}
233233

234234
// this abi has already been paired, skip it... unless there exists another, yet unassigned

accounts/abi/selector_parser.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package abi
1818

1919
import (
20+
"errors"
2021
"fmt"
2122
)
2223

@@ -40,7 +41,7 @@ func isIdentifierSymbol(c byte) bool {
4041

4142
func parseToken(unescapedSelector string, isIdent bool) (string, string, error) {
4243
if len(unescapedSelector) == 0 {
43-
return "", "", fmt.Errorf("empty token")
44+
return "", "", errors.New("empty token")
4445
}
4546
firstChar := unescapedSelector[0]
4647
position := 1
@@ -110,7 +111,7 @@ func parseCompositeType(unescapedSelector string) ([]interface{}, string, error)
110111

111112
func parseType(unescapedSelector string) (interface{}, string, error) {
112113
if len(unescapedSelector) == 0 {
113-
return nil, "", fmt.Errorf("empty type")
114+
return nil, "", errors.New("empty type")
114115
}
115116
if unescapedSelector[0] == '(' {
116117
return parseCompositeType(unescapedSelector)

accounts/abi/type.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var (
7070
func NewType(t string, internalType string, components []ArgumentMarshaling) (typ Type, err error) {
7171
// check that array brackets are equal if they exist
7272
if strings.Count(t, "[") != strings.Count(t, "]") {
73-
return Type{}, fmt.Errorf("invalid arg type in abi")
73+
return Type{}, errors.New("invalid arg type in abi")
7474
}
7575
typ.stringKind = t
7676

@@ -109,7 +109,7 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
109109
}
110110
typ.stringKind = embeddedType.stringKind + sliced
111111
} else {
112-
return Type{}, fmt.Errorf("invalid formatting of array type")
112+
return Type{}, errors.New("invalid formatting of array type")
113113
}
114114
return typ, err
115115
}
@@ -348,7 +348,7 @@ func (t Type) pack(v reflect.Value) ([]byte, error) {
348348
}
349349
}
350350

351-
// requireLengthPrefix returns whether the type requires any sort of length
351+
// requiresLengthPrefix returns whether the type requires any sort of length
352352
// prefixing.
353353
func (t Type) requiresLengthPrefix() bool {
354354
return t.T == StringTy || t.T == BytesTy || t.T == SliceTy

accounts/abi/unpack.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package abi
1818

1919
import (
2020
"encoding/binary"
21+
"errors"
2122
"fmt"
2223
"math"
2324
"math/big"
@@ -125,7 +126,7 @@ func readBool(word []byte) (bool, error) {
125126
// readFunctionType enforces that standard by always presenting it as a 24-array (address + sig = 24 bytes)
126127
func readFunctionType(t Type, word []byte) (funcTy [24]byte, err error) {
127128
if t.T != FunctionTy {
128-
return [24]byte{}, fmt.Errorf("abi: invalid type in call to make function type byte array")
129+
return [24]byte{}, errors.New("abi: invalid type in call to make function type byte array")
129130
}
130131
if garbage := binary.BigEndian.Uint64(word[24:32]); garbage != 0 {
131132
err = fmt.Errorf("abi: got improperly encoded function type, got %v", word)
@@ -138,7 +139,7 @@ func readFunctionType(t Type, word []byte) (funcTy [24]byte, err error) {
138139
// ReadFixedBytes uses reflection to create a fixed array to be read from.
139140
func ReadFixedBytes(t Type, word []byte) (interface{}, error) {
140141
if t.T != FixedBytesTy {
141-
return nil, fmt.Errorf("abi: invalid type in call to make fixed byte array")
142+
return nil, errors.New("abi: invalid type in call to make fixed byte array")
142143
}
143144
// convert
144145
array := reflect.New(t.GetType()).Elem()
@@ -166,7 +167,7 @@ func forEachUnpack(t Type, output []byte, start, size int) (interface{}, error)
166167
// declare our array
167168
refSlice = reflect.New(t.GetType()).Elem()
168169
} else {
169-
return nil, fmt.Errorf("abi: invalid type in array/slice unpacking stage")
170+
return nil, errors.New("abi: invalid type in array/slice unpacking stage")
170171
}
171172

172173
// Arrays have packed elements, resulting in longer unpack steps.

0 commit comments

Comments
 (0)