Address PR comments

This commit is contained in:
Matt Krump 2017-11-28 14:40:05 -06:00
parent 1bae6db483
commit 54458e9741
2 changed files with 8 additions and 8 deletions

View File

@ -12,13 +12,13 @@ type ContractAttribute struct {
type ContractAttributes []ContractAttribute
func (s ContractAttributes) Len() int {
return len(s)
func (attributes ContractAttributes) Len() int {
return len(attributes)
}
func (s ContractAttributes) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
func (attributes ContractAttributes) Swap(i, j int) {
attributes[i], attributes[j] = attributes[j], attributes[i]
}
func (s ContractAttributes) Less(i, j int) bool {
return s[i].Name < s[j].Name
func (attributes ContractAttributes) Less(i, j int) bool {
return attributes[i].Name < attributes[j].Name
}

View File

@ -95,7 +95,7 @@ var _ bool = Describe("The watched contract summary", func() {
Expect(contractSummary.GetStateAttribute("foo")).To(Equal("bar"))
})
It("gets a attributes for the contract from the blockchain", func() {
It("gets attributes for the contract from the blockchain", func() {
repository := repositories.NewInMemory()
watchedContract := core.WatchedContract{Hash: "0x123"}
repository.CreateWatchedContract(watchedContract)