mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
fdd32dd4e9
6 changed files with 6 additions and 16 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
1.5.7
|
||||
1.5.8
|
||||
|
|
|
|||
|
|
@ -169,12 +169,7 @@ func EncodeBig(bigint *big.Int) string {
|
|||
if nbits == 0 {
|
||||
return "0x0"
|
||||
}
|
||||
enc := make([]byte, 2, (nbits/8)*2+2)
|
||||
copy(enc, "0x")
|
||||
for i := len(bigint.Bits()) - 1; i >= 0; i-- {
|
||||
enc = strconv.AppendUint(enc, uint64(bigint.Bits()[i]), 16)
|
||||
}
|
||||
return string(enc)
|
||||
return fmt.Sprintf("0x%x", bigint)
|
||||
}
|
||||
|
||||
func has0xPrefix(input string) bool {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ var (
|
|||
{referenceBig("1"), "0x1"},
|
||||
{referenceBig("ff"), "0xff"},
|
||||
{referenceBig("112233445566778899aabbccddeeff"), "0x112233445566778899aabbccddeeff"},
|
||||
{referenceBig("80a7f2c1bcc396c00"), "0x80a7f2c1bcc396c00"},
|
||||
}
|
||||
|
||||
encodeUint64Tests = []marshalTest{
|
||||
|
|
|
|||
|
|
@ -109,13 +109,8 @@ func (b *Big) MarshalJSON() ([]byte, error) {
|
|||
if nbits == 0 {
|
||||
return jsonZero, nil
|
||||
}
|
||||
enc := make([]byte, 3, (nbits/8)*2+4)
|
||||
copy(enc, `"0x`)
|
||||
for i := len(bigint.Bits()) - 1; i >= 0; i-- {
|
||||
enc = strconv.AppendUint(enc, uint64(bigint.Bits()[i]), 16)
|
||||
}
|
||||
enc = append(enc, '"')
|
||||
return enc, nil
|
||||
enc := fmt.Sprintf(`"0x%x"`, bigint)
|
||||
return []byte(enc), nil
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements json.Unmarshaler.
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ func (self *LesTxRelay) send(txs types.Transactions, count int) {
|
|||
for p, list := range sendTo {
|
||||
cost := p.GetRequestCost(SendTxMsg, len(list))
|
||||
go func(p *peer, list types.Transactions, cost uint64) {
|
||||
p.fcServer.SendRequest(0, cost)
|
||||
p.SendTxs(cost, list)
|
||||
}(p, list, cost)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import "fmt"
|
|||
const (
|
||||
VersionMajor = 1 // Major version component of the current release
|
||||
VersionMinor = 5 // Minor version component of the current release
|
||||
VersionPatch = 7 // Patch version component of the current release
|
||||
VersionPatch = 8 // Patch version component of the current release
|
||||
VersionMeta = "unstable" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue