File tree Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -89,11 +89,6 @@ func CreateUtcTimestamp() *timestamp.Timestamp {
89
89
return & (timestamp.Timestamp {Seconds : secs , Nanos : nanos })
90
90
}
91
91
92
- //GenerateHashFromSignature returns a hash of the combined parameters
93
- func GenerateHashFromSignature (path string , args []byte ) []byte {
94
- return ComputeSHA256 (args )
95
- }
96
-
97
92
// GenerateIDfromTxSHAHash generates SHA256 hash using Tx payload
98
93
func GenerateIDfromTxSHAHash (payload []byte ) string {
99
94
return fmt .Sprintf ("%x" , ComputeSHA256 (payload ))
Original file line number Diff line number Diff line change @@ -63,17 +63,6 @@ func TestTimestamp(t *testing.T) {
63
63
}
64
64
}
65
65
66
- func TestGenerateHashFromSignature (t * testing.T ) {
67
- if bytes .Compare (GenerateHashFromSignature ("aPath" , []byte ("aCtor12" )),
68
- GenerateHashFromSignature ("aPath" , []byte ("aCtor12" ))) != 0 {
69
- t .Fatalf ("Expected hashes to match, but they did not match" )
70
- }
71
- if bytes .Compare (GenerateHashFromSignature ("aPath" , []byte ("aCtor12" )),
72
- GenerateHashFromSignature ("bPath" , []byte ("bCtor34" ))) == 0 {
73
- t .Fatalf ("Expected hashes to be different, but they match" )
74
- }
75
- }
76
-
77
66
func TestGeneratIDfromTxSHAHash (t * testing.T ) {
78
67
txid := GenerateIDfromTxSHAHash ([]byte ("foobar" ))
79
68
txid2 := GenerateIDfromTxSHAHash ([]byte ("foobar1" ))
You can’t perform that action at this time.
0 commit comments