update bite to take in string for urn and ilk
This commit is contained in:
parent
7080c0a74f
commit
7e6302c662
@ -64,9 +64,9 @@ func database(cmd *cobra.Command, args []string) {
|
|||||||
ipc = viper.GetString("client.ipcpath")
|
ipc = viper.GetString("client.ipcpath")
|
||||||
levelDbPath = viper.GetString("client.leveldbpath")
|
levelDbPath = viper.GetString("client.leveldbpath")
|
||||||
databaseConfig = config.Database{
|
databaseConfig = config.Database{
|
||||||
Name: viper.GetString("database.name"),
|
Name: "vulcanize_public",
|
||||||
Hostname: viper.GetString("database.hostname"),
|
Hostname: "localhost",
|
||||||
Port: viper.GetInt("database.port"),
|
Port: 5432,
|
||||||
User: viper.GetString("database.user"),
|
User: viper.GetString("database.user"),
|
||||||
Password: viper.GetString("database.password"),
|
Password: viper.GetString("database.password"),
|
||||||
}
|
}
|
||||||
|
@ -79,8 +79,8 @@ var _ = Describe("Bite Converter", func() {
|
|||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
expectedModel := bite.BiteModel{
|
expectedModel := bite.BiteModel{
|
||||||
Id: "1",
|
Id: "1",
|
||||||
Ilk: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
Ilk: "",
|
||||||
Urn: []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
Urn: "",
|
||||||
Ink: "",
|
Ink: "",
|
||||||
Art: "",
|
Art: "",
|
||||||
IArt: "",
|
IArt: "",
|
||||||
|
@ -21,8 +21,8 @@ import (
|
|||||||
|
|
||||||
type BiteEntity struct {
|
type BiteEntity struct {
|
||||||
Id *big.Int
|
Id *big.Int
|
||||||
Ilk [32]byte
|
Ilk string
|
||||||
Urn [32]byte
|
Urn string
|
||||||
Ink *big.Int
|
Ink *big.Int
|
||||||
Art *big.Int
|
Art *big.Int
|
||||||
Tab *big.Int
|
Tab *big.Int
|
||||||
|
@ -16,8 +16,8 @@ package bite
|
|||||||
|
|
||||||
type BiteModel struct {
|
type BiteModel struct {
|
||||||
Id string
|
Id string
|
||||||
Ilk []byte
|
Ilk string
|
||||||
Urn []byte
|
Urn string
|
||||||
Ink string
|
Ink string
|
||||||
Art string
|
Art string
|
||||||
IArt string
|
IArt string
|
||||||
|
@ -40,8 +40,8 @@ var (
|
|||||||
biteIArt = big.NewInt(5)
|
biteIArt = big.NewInt(5)
|
||||||
biteRawJson, _ = json.Marshal(EthBiteLog)
|
biteRawJson, _ = json.Marshal(EthBiteLog)
|
||||||
biteRawString = string(biteRawJson)
|
biteRawString = string(biteRawJson)
|
||||||
biteIlk = [32]byte{102, 97, 107, 101, 32, 105, 108, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
biteIlk = "ilk"
|
||||||
biteLad = [32]byte{102, 97, 107, 101, 32, 108, 97, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
biteLad = "urn"
|
||||||
biteId = int64(1)
|
biteId = int64(1)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ var BiteEntity = bite.BiteEntity{
|
|||||||
|
|
||||||
var BiteModel = bite.BiteModel{
|
var BiteModel = bite.BiteModel{
|
||||||
Id: strconv.FormatInt(biteId, 10),
|
Id: strconv.FormatInt(biteId, 10),
|
||||||
Ilk: biteIlk[:],
|
Ilk: biteIlk,
|
||||||
Urn: biteLad[:],
|
Urn: biteLad,
|
||||||
Ink: biteInk.String(),
|
Ink: biteInk.String(),
|
||||||
Art: biteArt.String(),
|
Art: biteArt.String(),
|
||||||
Tab: biteTab.String(),
|
Tab: biteTab.String(),
|
||||||
|
Loading…
Reference in New Issue
Block a user