Skip to content
Snippets Groups Projects
Select Git revision
  • 9789b0ee7f052c64b84f0c090de4250b3578e6db
  • main default protected
2 results

quad_img_simple_comp_avg.dot

Blame
  • datastructures.go 739 B
    package types
    
    // Message - MessageBody can be of any type but will be use here for Transaction, AckTransaction
    type Message struct {
    	MessageType string      `json:"messageType"`
    	MessageBody interface{} `json:"messageBody"`
    }
    
    // Transaction - represents a transaction in the blockchain
    type Transaction struct {
    	Id       string `json:"id"`
    	Sender   string `json:"sender"`
    	Receiver string `json:"receiver"`
    	Amount   string `json:"amount"`
    }
    
    // AckTransaction - represents an acknowledgement of a transaction @see vote function
    type AckTransaction struct {
    	Id                  string `json:"id"`
    	AmountOfCorrectNode int    `json:"amountOfCorrectNode"`
    	TotalNodes          int    `json:"totalNodes"`
    }
    
    type Database []Transaction