{"action":"closed","issue":{"url":"https://api.github.com/repos/ScaleChain/scalechain/issues/63","repository_url":"https://api.github.com/repos/ScaleChain/scalechain","labels_url":"https://api.github.com/repos/ScaleChain/scalechain/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/ScaleChain/scalechain/issues/63/comments","events_url":"https://api.github.com/repos/ScaleChain/scalechain/issues/63/events","html_url":"https://github.com/ScaleChain/scalechain/issues/63","id":157338953,"number":63,"title":"Remove HashCalculator.Instead of HashCalculator, use transaction.hash, blockHeader.hash in codes.","user":{"login":"Kangmo","id":510271,"avatar_url":"https://avatars.githubusercontent.com/u/510271?v=3","gravatar_id":"","url":"https://api.github.com/users/Kangmo","html_url":"https://github.com/Kangmo","followers_url":"https://api.github.com/users/Kangmo/followers","following_url":"https://api.github.com/users/Kangmo/following{/other_user}","gists_url":"https://api.github.com/users/Kangmo/gists{/gist_id}","starred_url":"https://api.github.com/users/Kangmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kangmo/subscriptions","organizations_url":"https://api.github.com/users/Kangmo/orgs","repos_url":"https://api.github.com/users/Kangmo/repos","events_url":"https://api.github.com/users/Kangmo/events{/privacy}","received_events_url":"https://api.github.com/users/Kangmo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-28T13:29:51Z","updated_at":"2016-05-28T14:15:29Z","closed_at":"2016-05-28T14:15:29Z","body":"## what\r\nRemove HashCalculator. \r\nCurrently, we call HashCalculator.blockHeaderHash(blockHeader) to get the header of the block hash.\r\nInstead, change the code to blockHeader.hash .\r\n## why\r\nFor better code readability.\r\n\r\n## how\r\nThe BlockHeader class is in the proto layer, whereas HashCalculator is in the crypto layer.\r\nBecause the proto layer is below the crypto layer, the BlockHeader class can not use the hash calculating functions in the crypto layer.\r\nCreate a new class called BlockHeaderEx in the crypto layer extending BlockHeader class.\r\nadd hash method to the blockHeaderEx, and create implicit type converter from the BlockHeader to the BlockHeaderEx. "}}
{"actor":{"display_login":"Kangmo"}}