瀏覽代碼

jsre, rpc/api: pull in new web3 and use hex numbers

Péter Szilágyi 10 年之前
父節點
當前提交
d4d3fc6a70
共有 3 個文件被更改,包括 183 次插入134 次删除
  1. 180 127
      jsre/ethereum_js.go
  2. 3 3
      rpc/api/eth.go
  3. 0 4
      rpc/api/eth_js.go

File diff suppressed because it is too large
+ 180 - 127
jsre/ethereum_js.go


+ 3 - 3
rpc/api/eth.go

@@ -173,9 +173,9 @@ func (self *ethApi) IsSyncing(req *shared.Request) (interface{}, error) {
 
 	if current < height {
 		return map[string]interface{}{
-			"startingBlock": origin,
-			"currentBlock":  current,
-			"highestBlock":  height,
+			"startingBlock": newHexNum(big.NewInt(int64(origin)).Bytes()),
+			"currentBlock":  newHexNum(big.NewInt(int64(current)).Bytes()),
+			"highestBlock":  newHexNum(big.NewInt(int64(height)).Bytes()),
 		}, nil
 	}
 	return false, nil

+ 0 - 4
rpc/api/eth_js.go

@@ -42,10 +42,6 @@ web3._extend({
 		new web3._extend.Property({
 			name: 'pendingTransactions',
 			getter: 'eth_pendingTransactions'
-		}),
-		new web3._extend.Property({
-			name: 'syncing',
-			getter: 'eth_syncing'
 		})
 	]
 });

Some files were not shown because too many files changed in this diff