ITPeople-Blockchain / auction

ITPeople Blockchain - Art Auction Demo
162 stars 183 forks source link

Add files via upload - art_app_bmixv20.... #42

Closed movee2016 closed 8 years ago

movee2016 commented 8 years ago

pulled the version from June 30th around 10.10 am and made the changes. This version supports the following:

  1. Does not accept bids if

    Auction is not Open Item on Bid does not match Item on Auction Owner on Auction and Bid do not match Bid receipt time is > auction.CloseDate Bid Price is <= Reserve Price2.

  2. Transfer will not work if the Item is on auction where auction status is "INIT" or "OPEN"
  3. Same Item can be put on auction again provided it is not on auction (A new function has been added that checks both the AucInitTable and AucOpenTable) // Let us make sure that the Item is not on Auction err = VerifyIfItemIsOnAuction(stub, ar.ItemID) if err != nil { fmt.Println("PostAuctionRequest() : Failed Item is either initiated or opened for Auction ", args[0]) return nil, err }
  4. The Go routine that automatically closes auctions is removed. Instead, a periodic call to close all open auctions can be issued (see the log file) ./peer chaincode invoke -l golang -n mycc -c '{"Function": "CloseOpenAuctions", "Args": ["2016", "CLAUC"]}'
  5. The Item History table has a 4th key - i.e. date and time.
  6. Some new functions added include CloseOpenAuctions, tCompare(time1, time2), VerifyIfItemIsOnAuction(...)

Please work on this version. Once you are done, I will update the CLI version of the app that supports the Go routine and automatic closure. The reliability of results is quite good. Crash can be expected if the peer has been running for a while and is periodically waking up from hibernate or sleep.

movee2016 commented 8 years ago

Updated Readme