mit-dci / opencx

An open-source cryptocurrency exchange toolkit for implementing experimental exchange features
MIT License
206 stars 66 forks source link

Hi,I found a SQL error in 'opencx/cxdb/cxdbsql/depositstore.go' line 38. #33

Closed nightfallsad closed 5 years ago

nightfallsad commented 5 years ago

When I run 'go build ./cmd/opencxd/...' and executed './opencxd',it threw an error image. I think its because this code is incorrect,the two 'pubkey' isn't match. 'depositAddrStoreSchema = "pubkey VARBINARY(66), address VARCHAR(34), CONSTRAINT unique_pubkeys UNIQUE (pubkeys, address)"'

Rjected commented 5 years ago

Hi @nightfallsad, good catch! That's definitely a bug, can I see what the rest of the error said? I also can't reproduce it, do you have any more information, like your OS, and which database you're using (mariadb vs mysql etc.)?

nightfallsad commented 5 years ago

Hi @Rjected ,I changed the code 'depositAddrStoreSchema = "pubkey VARBINARY(66), address VARCHAR(34), CONSTRAINT unique_pubkeys UNIQUE (pubkeys, address)' to 'depositAddrStoreSchema = "pubkey VARBINARY(66), address VARCHAR(34), CONSTRAINT unique_pubkeys UNIQUE (pubkey, address)'.The problem was resolved. (pubkeys, address) -> (pubkey, address)