Skip to content

Commit

Permalink
chore: code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Code Monad committed Sep 19, 2023
1 parent f43aa55 commit 6c1e5ff
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion types/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type TransactionStatus string
const (
HashTypeData ScriptHashType = "data"
HashTypeData1 ScriptHashType = "data1"
HashTypeData2 ScriptHashType = "data2"
HashTypeData2 ScriptHashType = "data2"
HashTypeType ScriptHashType = "type"

DepTypeCode DepType = "code"
Expand Down
4 changes: 2 additions & 2 deletions types/molecule.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ func (t ScriptHashType) Pack() *molecule.Byte {
b = 0x01
case HashTypeData1:
b = 0x02
case HashTypeData2:
b = 0x04
case HashTypeData2:
b = 0x04
default:
return nil
}
Expand Down
8 changes: 4 additions & 4 deletions types/serialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ func SerializeHashTypeByte(hashType ScriptHashType) (byte, error) {
return 0x01, nil
case HashTypeData1:
return 0x02, nil
case HashTypeData2:
return 0x04, nil
case HashTypeData2:
return 0x04, nil
default:
return 0, errors.New(string("unknown hash type " + hashType))
}
Expand All @@ -81,8 +81,8 @@ func DeserializeHashTypeByte(hashType byte) (ScriptHashType, error) {
return HashTypeType, nil
case 0x02:
return HashTypeData1, nil
case 0x04:
return HashTypeData2, nil
case 0x04:
return HashTypeData2, nil
default:
return "", errors.New(fmt.Sprintf("invalid script hash_type: %x", hashType))
}
Expand Down

0 comments on commit 6c1e5ff

Please sign in to comment.