Skip to content

Commit

Permalink
feat: update ethereum, build on go 1.11 (#1564)
Browse files Browse the repository at this point in the history
Now the project can be built on go 1.11.
  • Loading branch information
3Hren committed Oct 1, 2018
1 parent 9af19b6 commit 6f7d03d
Show file tree
Hide file tree
Showing 1,984 changed files with 67,671 additions and 587,113 deletions.
2 changes: 1 addition & 1 deletion connor/price/cmc_wtm_test.go
Expand Up @@ -106,7 +106,7 @@ func TestCalculateXmrPrice(t *testing.T) {
expected: big.NewInt(5912092344),
},
{
price: big.NewInt(params.Finney),
price: big.NewInt(1e15),
reward: 4,
netHash: 563816182,
expected: big.NewInt(59120),
Expand Down
2 changes: 1 addition & 1 deletion connor/types/corder.go
Expand Up @@ -76,7 +76,7 @@ func (co *Corder) GetHashrate() uint64 {
func (co *Corder) AsBID() *sonm.BidOrder {
return &sonm.BidOrder{
Price: &sonm.Price{PerSecond: co.Order.GetPrice()},
Blacklist: sonm.NewEthAddress(common.StringToAddress(co.Order.GetBlacklist())),
Blacklist: sonm.NewEthAddress(common.HexToAddress(co.Order.GetBlacklist())),
Identity: co.Order.IdentityLevel,
Tag: string(co.Tag),
Counterparty: co.CounterpartyID,
Expand Down
4 changes: 2 additions & 2 deletions insonmnia/oracle/oracle.go
Expand Up @@ -157,11 +157,11 @@ func (o *Oracle) getPriceForSubmit() (*big.Int, error) {
return nil, fmt.Errorf("actual price is not downloaded")
}

if o.actualPrice.Cmp(big.NewInt(params.Finney)) < 0 {
if o.actualPrice.Cmp(big.NewInt(1e15)) < 0 {
return nil, fmt.Errorf("oracle mustn't automaticly set price lower than 1e15")
}

if o.actualPrice.Cmp(big.NewInt(0).Mul(big.NewInt(params.Ether), big.NewInt(params.Ada))) > 0 {
if o.actualPrice.Cmp(big.NewInt(0).Mul(big.NewInt(params.Ether), big.NewInt(1e3))) > 0 {
return nil, fmt.Errorf("oracle mustn't automaticly set price greater than 1e21")
}
return big.NewInt(0).Set(o.actualPrice), nil
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions vendor/github.com/deckarep/golang-set/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 95 additions & 0 deletions vendor/github.com/deckarep/golang-set/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 58 additions & 0 deletions vendor/github.com/deckarep/golang-set/iterator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f7d03d

Please sign in to comment.