update bite to take in string for urn and ilk

This commit is contained in:
Taka Goto 2018-10-04 16:35:51 -05:00
parent 7080c0a74f
commit 7e6302c662
5 changed files with 13 additions and 13 deletions

View File

@ -64,9 +64,9 @@ func database(cmd *cobra.Command, args []string) {
ipc = viper.GetString("client.ipcpath")
levelDbPath = viper.GetString("client.leveldbpath")
databaseConfig = config.Database{
Name: viper.GetString("database.name"),
Hostname: viper.GetString("database.hostname"),
Port: viper.GetInt("database.port"),
Name: "vulcanize_public",
Hostname: "localhost",
Port: 5432,
User: viper.GetString("database.user"),
Password: viper.GetString("database.password"),
}

View File

@ -79,8 +79,8 @@ var _ = Describe("Bite Converter", func() {
Expect(err).NotTo(HaveOccurred())
expectedModel := bite.BiteModel{
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},
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},
Ilk: "",
Urn: "",
Ink: "",
Art: "",
IArt: "",

View File

@ -21,8 +21,8 @@ import (
type BiteEntity struct {
Id *big.Int
Ilk [32]byte
Urn [32]byte
Ilk string
Urn string
Ink *big.Int
Art *big.Int
Tab *big.Int

View File

@ -16,8 +16,8 @@ package bite
type BiteModel struct {
Id string
Ilk []byte
Urn []byte
Ilk string
Urn string
Ink string
Art string
IArt string

View File

@ -40,8 +40,8 @@ var (
biteIArt = big.NewInt(5)
biteRawJson, _ = json.Marshal(EthBiteLog)
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}
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}
biteIlk = "ilk"
biteLad = "urn"
biteId = int64(1)
)
@ -76,8 +76,8 @@ var BiteEntity = bite.BiteEntity{
var BiteModel = bite.BiteModel{
Id: strconv.FormatInt(biteId, 10),
Ilk: biteIlk[:],
Urn: biteLad[:],
Ilk: biteIlk,
Urn: biteLad,
Ink: biteInk.String(),
Art: biteArt.String(),
Tab: biteTab.String(),