-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add first batch of pull request rework
- update Application section in README - remove param name in app.go - add error checks in processor/block.go - move vars from model to transact logic - move newAsset to transact - use ID for well-known initialisms - move randomelement, randomnint and differentelement to transact - remove AssertDefined - blockTxIdsJoinedByComma: use standard library to join elements - return nil, instead of []byte{} - remove go routine in listen.go - move cache to parser - inline processor in listen.go - move store to main package - move util to main package - fixed failing cache issue - fixed staticcheck issues Signed-off-by: Stanislav Jakuschevskij <[email protected]>
- Loading branch information
Showing
23 changed files
with
496 additions
and
608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ package main | |
import ( | ||
"crypto/x509" | ||
"fmt" | ||
"offChainData/utils" | ||
"os" | ||
"path" | ||
"time" | ||
|
@@ -24,27 +23,27 @@ import ( | |
const peerName = "peer0.org1.example.com" | ||
|
||
var ( | ||
channelName = utils.EnvOrDefault("CHANNEL_NAME", "mychannel") | ||
chaincodeName = utils.EnvOrDefault("CHAINCODE_NAME", "basic") | ||
mspID = utils.EnvOrDefault("MSP_ID", "Org1MSP") | ||
channelName = envOrDefault("CHANNEL_NAME", "mychannel") | ||
chaincodeName = envOrDefault("CHAINCODE_NAME", "basic") | ||
mspID = envOrDefault("MSP_ID", "Org1MSP") | ||
|
||
// Path to crypto materials. | ||
cryptoPath = utils.EnvOrDefault("CRYPTO_PATH", "../../test-network/organizations/peerOrganizations/org1.example.com") | ||
cryptoPath = envOrDefault("CRYPTO_PATH", "../../test-network/organizations/peerOrganizations/org1.example.com") | ||
|
||
// Path to user private key directory. | ||
keyDirectoryPath = utils.EnvOrDefault("KEY_DIRECTORY_PATH", cryptoPath+"/users/[email protected]/msp/keystore") | ||
keyDirectoryPath = envOrDefault("KEY_DIRECTORY_PATH", cryptoPath+"/users/[email protected]/msp/keystore") | ||
|
||
// Path to user certificate. | ||
certPath = utils.EnvOrDefault("CERT_PATH", cryptoPath+"/users/[email protected]/msp/signcerts/cert.pem") | ||
certPath = envOrDefault("CERT_PATH", cryptoPath+"/users/[email protected]/msp/signcerts/cert.pem") | ||
|
||
// Path to peer tls certificate. | ||
tlsCertPath = utils.EnvOrDefault("TLS_CERT_PATH", cryptoPath+"/peers/peer0.org1.example.com/tls/ca.crt") | ||
tlsCertPath = envOrDefault("TLS_CERT_PATH", cryptoPath+"/peers/peer0.org1.example.com/tls/ca.crt") | ||
|
||
// Gateway peer endpoint. | ||
peerEndpoint = utils.EnvOrDefault("PEER_ENDPOINT", "dns:///localhost:7051") | ||
peerEndpoint = envOrDefault("PEER_ENDPOINT", "dns:///localhost:7051") | ||
|
||
// Gateway peer SSL host name override. | ||
peerHostAlias = utils.EnvOrDefault("PEER_HOST_ALIAS", peerName) | ||
peerHostAlias = envOrDefault("PEER_HOST_ALIAS", peerName) | ||
) | ||
|
||
func newGrpcConnection() *grpc.ClientConn { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module offChainData | ||
module offchaindata | ||
|
||
go 1.22.0 | ||
|
||
|
Oops, something went wrong.