Skip to content

Commit

Permalink
Adapt to CESS 0.7.6 (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
AstaFrode authored Jan 31, 2024
1 parent de19f91 commit 385bd4a
Show file tree
Hide file tree
Showing 12 changed files with 421 additions and 343 deletions.
12 changes: 0 additions & 12 deletions cmd/console/reward.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func Command_Reward_Runfunc(cmd *cobra.Command, args []string) {
}
var total string
var claimed string
var available string
var sep uint8 = 0
for i := len(rewardInfo.Total) - 1; i >= 0; i-- {
total = fmt.Sprintf("%c%s", rewardInfo.Total[i], total)
Expand All @@ -94,20 +93,9 @@ func Command_Reward_Runfunc(cmd *cobra.Command, args []string) {
}
claimed = strings.TrimPrefix(claimed, "_")

sep = 0
for i := len(rewardInfo.Available) - 1; i >= 0; i-- {
available = fmt.Sprintf("%c%s", rewardInfo.Available[i], available)
sep++
if sep%3 == 0 {
available = fmt.Sprintf("_%s", available)
}
}
available = strings.TrimPrefix(available, "_")

var tableRows = []table.Row{
{"total reward", total},
{"claimed reward", claimed},
{"available reward", available},
}
tw := table.NewWriter()
tw.AppendRows(tableRows)
Expand Down
4 changes: 0 additions & 4 deletions configs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ const (
MinMTagFileSize = 600000
)

const (
OrserState_CalcTag uint8 = 2
)

const (
Err_tee_Busy = "is being fully calculated"
Err_ctx_exceeded = "context deadline exceeded"
Expand Down
2 changes: 1 addition & 1 deletion configs/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (
// Name is the name of the program
Name = "bucket"
// version
Version = "v0.7.9 pre-release"
Version = "v0.7.9"
// Description is the description of the program
Description = "Storage node implementation in CESS networks"
// NameSpace is the cached namespace
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ go 1.20

require (
github.com/AstaFrode/go-libp2p v0.26.4-0.20231113143058-912296254d44
github.com/CESSProject/cess-go-sdk v0.4.32
github.com/CESSProject/cess-go-sdk v0.5.0
github.com/CESSProject/cess_pois v0.4.22
github.com/CESSProject/p2p-go v0.2.13
github.com/CESSProject/p2p-go v0.3.0
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce
github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1
github.com/gin-contrib/cors v1.5.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ github.com/AstaFrode/go-peertaskqueue v0.8.2-0.20231108073729-990e433425a4 h1:fu
github.com/AstaFrode/go-peertaskqueue v0.8.2-0.20231108073729-990e433425a4/go.mod h1:0YcQDsyTRKBTK9yE22DQgiwQndGFvenqMvD6Spkxl28=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/CESSProject/cess-go-sdk v0.4.32 h1:/VcKShWBPJdJkthlnLzLYbiQgRhKzp7GG1A2dd+XjHM=
github.com/CESSProject/cess-go-sdk v0.4.32/go.mod h1:IamF02Ng+FQvThFbQRtpEpPzmlPOXqQzgaF9YDE0YhY=
github.com/CESSProject/cess-go-sdk v0.5.0 h1:N87Trs+Btt3mftpRxMt7ZeI7va4v/SaT4OiZxi00KA4=
github.com/CESSProject/cess-go-sdk v0.5.0/go.mod h1:IamF02Ng+FQvThFbQRtpEpPzmlPOXqQzgaF9YDE0YhY=
github.com/CESSProject/cess_pois v0.4.22 h1:RxQRg8A3z79mt19Jb5yd39lIjBSWKBih1KLIqN1WnIY=
github.com/CESSProject/cess_pois v0.4.22/go.mod h1:rztEZjjG+MbKzVgh5WtQcZc/7ZDkBvDNABc7Em8BKPc=
github.com/CESSProject/go-keyring v0.0.0-20220614131247-ee3a8da30fde h1:5MDRjjtg6PEhqyVjupwaapN96cOZiddOGAYwKQeaTu0=
github.com/CESSProject/go-keyring v0.0.0-20220614131247-ee3a8da30fde/go.mod h1:RUXBd3ROP98MYepEEa0Y0l/T0vQlIKqFJxI/ocdnRLM=
github.com/CESSProject/p2p-go v0.2.13 h1:JWETd5xqvHUBkE86EV4IFXluhdaAnqXA1YLcQlLhvzo=
github.com/CESSProject/p2p-go v0.2.13/go.mod h1:SMwJt5Zpk98k+d2J5gsN+0Forr7MbqOYWbHLd3mBLrI=
github.com/CESSProject/p2p-go v0.3.0 h1:PdwbLBri3qYwIHxaG4BHHS3ETH1BlVRCnBG87jr5cQg=
github.com/CESSProject/p2p-go v0.3.0/go.mod h1:SMwJt5Zpk98k+d2J5gsN+0Forr7MbqOYWbHLd3mBLrI=
github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM=
github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4=
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
Expand Down
Loading

0 comments on commit 385bd4a

Please sign in to comment.