Skip to content

Commit ff55c6f

Browse files
committed
Merge branch 'develop' into conversion
Conflicts: common/types.go
2 parents b0ebccb + 9663493 commit ff55c6f

124 files changed

Lines changed: 12712 additions & 997 deletions

File tree

Some content is hidden

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

‎cmd/mist/bindings.go‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import (
2626
"strconv"
2727

2828
"github.com/ethereum/go-ethereum/cmd/utils"
29-
"github.com/ethereum/go-ethereum/core/types"
3029
"github.com/ethereum/go-ethereum/common"
30+
"github.com/ethereum/go-ethereum/core/types"
3131
"github.com/ethereum/go-ethereum/state"
3232
)
3333

@@ -37,18 +37,9 @@ type plugin struct {
3737
}
3838

3939
func (gui *Gui) Transact(from, recipient, value, gas, gasPrice, d string) (string, error) {
40-
var data string
41-
if len(recipient) == 0 {
42-
code, err := common.Compile(d, false)
43-
if err != nil {
44-
return "", err
45-
}
46-
data = common.Bytes2Hex(code)
47-
} else {
48-
data = common.Bytes2Hex(utils.FormatTransactionData(d))
49-
}
40+
d = common.Bytes2Hex(utils.FormatTransactionData(d))
5041

51-
return gui.xeth.Transact(from, recipient, value, gas, gasPrice, data)
42+
return gui.xeth.Transact(from, recipient, value, gas, gasPrice, d)
5243
}
5344

5445
func (self *Gui) AddPlugin(pluginPath string) {

‎cmd/mist/ui_lib.go‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import (
2525
"io/ioutil"
2626
"path"
2727

28+
"github.com/ethereum/go-ethereum/common"
2829
"github.com/ethereum/go-ethereum/core/types"
2930
"github.com/ethereum/go-ethereum/eth"
30-
"github.com/ethereum/go-ethereum/common"
3131
"github.com/ethereum/go-ethereum/event/filter"
3232
"github.com/ethereum/go-ethereum/javascript"
3333
"github.com/ethereum/go-ethereum/xeth"
@@ -137,15 +137,6 @@ func (self *UiLib) Transact(params map[string]interface{}) (string, error) {
137137
)
138138
}
139139

140-
func (self *UiLib) Compile(code string) (string, error) {
141-
bcode, err := common.Compile(code, false)
142-
if err != nil {
143-
return err.Error(), err
144-
}
145-
146-
return common.Bytes2Hex(bcode), err
147-
}
148-
149140
func (self *UiLib) Call(params map[string]interface{}) (string, error) {
150141
object := mapToTxParams(params)
151142

‎common/types.go‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ type (
1212
Address [addressLength]byte
1313
)
1414

15-
var (
16-
zeroHash Hash
17-
zeroAddress Address
18-
)
19-
2015
func BytesToHash(b []byte) Hash {
2116
var h Hash
2217
h.SetBytes(b)
@@ -41,7 +36,7 @@ func (h *Hash) SetBytes(b []byte) {
4136

4237
// reverse loop
4338
for i := len(b) - 1; i >= 0; i-- {
44-
h[i] = b[i]
39+
h[hashLength-len(b)+i] = b[i]
4540
}
4641
}
4742

@@ -79,7 +74,7 @@ func (a *Address) SetBytes(b []byte) {
7974

8075
// reverse loop
8176
for i := len(b) - 1; i >= 0; i-- {
82-
a[i] = b[i]
77+
a[addressLength-len(b)+i] = b[i]
8378
}
8479
}
8580

‎tests/files/BasicTests/crypto.json‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
[
2-
{
1+
{
2+
"aes1": {
33
"decryption_type": "aes_ctr",
44
"key": "abb51256c1324a1350598653f46aa3ad693ac3cf5d05f36eba3f495a1f51590f",
55
"cipher": "84a727bc81fa4b13947dc9728b88fd08",
66
"payload": "000102030405060708090a0b0c0d0e0f"
7+
},
8+
9+
"ecies1": {
10+
"decryption_type": "ecies_sec1_altered",
11+
"key": "5e173f6ac3c669587538e7727cf19b782a4f2fda07c1eaa662c593e5e85e3051",
12+
"cipher": "049934a7b2d7f9af8fd9db941d9da281ac9381b5740e1f64f7092f3588d4f87f5ce55191a6653e5e80c1c5dd538169aa123e70dc6ffc5af1827e546c0e958e42dad355bcc1fcb9cdf2cf47ff524d2ad98cbf275e661bf4cf00960e74b5956b799771334f426df007350b46049adb21a6e78ab1408d5e6ccde6fb5e69f0f4c92bb9c725c02f99fa72b9cdc8dd53cff089e0e73317f61cc5abf6152513cb7d833f09d2851603919bf0fbe44d79a09245c6e8338eb502083dc84b846f2fee1cc310d2cc8b1b9334728f97220bb799376233e113",
13+
"payload": "802b052f8b066640bba94a4fc39d63815c377fced6fcb84d27f791c9921ddf3e9bf0108e298f490812847109cbd778fae393e80323fd643209841a3b7f110397f37ec61d84cea03dcc5e8385db93248584e8af4b4d1c832d8c7453c0089687a700"
714
}
8-
]
15+
16+
}

‎tests/files/BlockTests/bcBlockChainTest.json‎

Lines changed: 0 additions & 108 deletions
This file was deleted.

0 commit comments

Comments
 (0)