Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
복호화 이전까지 작업 완료
Browse files Browse the repository at this point in the history
  • Loading branch information
G0Yang committed Aug 29, 2018
1 parent 943b122 commit 8142af6
Show file tree
Hide file tree
Showing 78 changed files with 688 additions and 891 deletions.
6 changes: 4 additions & 2 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
"\\encryption",
"\\ledger",
"\\msp",
"\\msp\\msp_Client"
"\\msp\\msp_Client",
"\\msp\\msp_Server",
"\\Stakeholder"
],
"SelectedNode": "\\chaincode\\server_Json.py",
"SelectedNode": "\\test.py",
"PreviewInSolutionExplorer": false
}
Binary file modified .vs/foodchain/v15/.suo
Binary file not shown.
Binary file modified .vs/slnx.sqlite
Binary file not shown.
Binary file modified __pycache__/metadata.cpython-36.pyc
Binary file not shown.
Binary file modified chaincode/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file modified chaincode/__pycache__/blockToJson.cpython-36.pyc
Binary file not shown.
Binary file modified chaincode/__pycache__/chainToJson.cpython-36.pyc
Binary file not shown.
Binary file modified chaincode/__pycache__/leader_rand.cpython-36.pyc
Binary file not shown.
Binary file modified chaincode/__pycache__/randFileName.cpython-36.pyc
Binary file not shown.
Binary file modified chaincode/__pycache__/server_Json.cpython-36.pyc
Binary file not shown.
Binary file modified chaincode/__pycache__/transactionToJson.cpython-36.pyc
Binary file not shown.
22 changes: 0 additions & 22 deletions data_client/test.json

This file was deleted.

1 change: 0 additions & 1 deletion data_client/tx_.json

This file was deleted.

22 changes: 0 additions & 22 deletions data_client/tx_52qp2i55919387.json

This file was deleted.

1 change: 0 additions & 1 deletion data_client/tx_9z3crvy7897529.json

This file was deleted.

1 change: 0 additions & 1 deletion data_client/tx_opg5kvm5042464.json

This file was deleted.

Binary file modified data_server/202.31.146.57_skec.txt
Binary file not shown.
1 change: 0 additions & 1 deletion data_server/block_1n0o7t8l327069.json

This file was deleted.

37 changes: 0 additions & 37 deletions data_server/block_5ngp95al922442.json

This file was deleted.

1 change: 0 additions & 1 deletion data_server/block_5wgc0aic535453.json

This file was deleted.

1 change: 0 additions & 1 deletion data_server/block__4hkji3b357890.json

This file was deleted.

1 change: 0 additions & 1 deletion data_server/block_firmkm3l790079.json

This file was deleted.

1 change: 0 additions & 1 deletion data_server/block_iagt6o67749865.json

This file was deleted.

37 changes: 0 additions & 37 deletions data_server/block_onrpj9qu731346.json

This file was deleted.

Binary file removed data_server/block_owtn_tpj454413
Binary file not shown.
1 change: 0 additions & 1 deletion data_server/block_owtn_tpj454413.json

This file was deleted.

1 change: 0 additions & 1 deletion data_server/block_p992a85mn57458.json

This file was deleted.

Binary file removed data_server/block_przlvdlzy59073
Binary file not shown.
1 change: 0 additions & 1 deletion data_server/block_przlvdlzy59073.json

This file was deleted.

1 change: 0 additions & 1 deletion data_server/block_pvqpxmgnk65403.json

This file was deleted.

1 change: 0 additions & 1 deletion data_server/block_px49ho0qf80261.json

This file was deleted.

37 changes: 0 additions & 37 deletions data_server/block_ssr624o9124819.json

This file was deleted.

Binary file removed data_server/block_w0_cwm84182280
Binary file not shown.
1 change: 0 additions & 1 deletion data_server/block_w0_cwm84182280.json

This file was deleted.

37 changes: 0 additions & 37 deletions data_server/block_zeh1ca9p444012.json

This file was deleted.

2 changes: 1 addition & 1 deletion data_server/ch_1.json

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions data_server/tx_52qp2i55919387.json

This file was deleted.

23 changes: 0 additions & 23 deletions data_server/tx_9z3crvy7897529.json

This file was deleted.

23 changes: 0 additions & 23 deletions data_server/tx_opg5kvm5042464.json

This file was deleted.

23 changes: 0 additions & 23 deletions data_server/tx_panub__9023091.json

This file was deleted.

Binary file modified encryption/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file modified encryption/__pycache__/createSymKey.cpython-36.pyc
Binary file not shown.
Binary file modified encryption/__pycache__/tr_sk_decrypt.cpython-36.pyc
Binary file not shown.
Binary file modified encryption/__pycache__/tr_sk_encrypt.cpython-36.pyc
Binary file not shown.
Binary file modified hash256/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file modified hash256/__pycache__/hash256.cpython-36.pyc
Binary file not shown.
Binary file modified ledger/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file modified ledger/__pycache__/block.cpython-36.pyc
Binary file not shown.
Binary file modified ledger/__pycache__/blockheader.cpython-36.pyc
Binary file not shown.
Binary file modified ledger/__pycache__/chain.cpython-36.pyc
Binary file not shown.
Binary file modified ledger/__pycache__/transaction.cpython-36.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
27 changes: 18 additions & 9 deletions ledger/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,24 @@ def __init__(self, *args, **kwargs):
self.BB = []
try:
tx = args[0]
if str(type(tx)) == "<class 'ledger.transaction.transaction'>":
self.BB.append(tx)
self.BH.setCurrentHash(hash256(str(tx.toDict())).getHash())
self.transactionCount = self.transactionCount + 1
self.BB[0].txCount = self.transactionCount
sizeof = str(self.toDict())
self.blocksize = len(sizeof)
self.blockID=randFileName()[0:-5]
list_tx = ["<class 'ledger.transaction.transaction'>",
"<class 'ledger.transaction_Producer.transaction_Producer'>",
"<class 'ledger.transaction_Vehicle_wearing.transaction_Vehicle_wearing'>",
"<class 'ledger.transaction_Vehicle_shipment.transaction_Vehicle_shipment'>",
"<class 'ledger.transaction_Inventory_Management.transaction_Inventory_Management'>",
"<class 'ledger.transaction_Auction.transaction_Auction'>",
"<class 'ledger.transaction_Seller.transaction_Seller'>"]

for i in list_tx:
if str(type(tx)) == i:
self.BB.append(tx)
self.BH.setCurrentHash(hash256(str(tx.toDict())).getHash())
self.transactionCount = self.transactionCount + 1
self.BB[0].txCount = self.transactionCount
sizeof = str(self.toDict())
self.blocksize = len(sizeof)
self.blockID=randFileName()[0:-5]

except:
print("init Error")
return
Expand Down Expand Up @@ -123,4 +133,3 @@ def fromDict(self, Dict):
print()
print(b1.toDict())
print("---------------------------------------------------")

Loading

0 comments on commit 8142af6

Please sign in to comment.