Skip to content

Commit

Permalink
Added insert killed ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayashsatolia403 committed Nov 2, 2024
1 parent 5e66d11 commit 9c92d4d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions core/transaction/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ const (
STORAGESC_RESET_BLOBBER_STATS = "reset_blobber_stats"
STORAGESC_RESET_ALLOCATION_STATS = "reset_allocation_stats"
STORAGESC_RESET_BLOBBER_VERSION = "update_blobber_version"
STORAGESC_INSERT_KILLED_PROVIDER_ID = "insert_killed_provider_id"

MINERSC_LOCK = "addToDelegatePool"
MINERSC_UNLOCK = "deleteFromDelegatePool"
Expand Down
19 changes: 16 additions & 3 deletions zboxcore/sdk/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1218,18 +1218,31 @@ func ResetBlobberStats(rbs *ResetBlobberStatsDto) (string, int64, error) {
return hash, n, err
}

type StorageNodeVersion struct {
type StorageNodeIdField struct {
Id string `json:"id"`
}

func ResetBlobberVersion(snv *StorageNodeVersion) (string, int64, error) {
func ResetBlobberVersion(snId *StorageNodeIdField) (string, int64, error) {
if !client.IsSDKInitialized() {
return "", 0, sdkNotInitialized
}

var sn = transaction.SmartContractTxnData{
Name: transaction.STORAGESC_RESET_BLOBBER_VERSION,
InputArgs: snv,
InputArgs: snId,
}
hash, _, n, _, err := storageSmartContractTxn(sn)
return hash, n, err
}

func InsertKilledProviderID(snId *StorageNodeIdField) (string, int64, error) {
if !client.IsSDKInitialized() {
return "", 0, sdkNotInitialized
}

var sn = transaction.SmartContractTxnData{
Name: transaction.STORAGESC_INSERT_KILLED_PROVIDER_ID,
InputArgs: snId,
}
hash, _, n, _, err := storageSmartContractTxn(sn)
return hash, n, err
Expand Down

0 comments on commit 9c92d4d

Please sign in to comment.