You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by cm...@apache.org on 2019/10/02 08:01:04 UTC

[incubator-milagro-dta] 01/02: remove notes

This is an automated email from the ASF dual-hosted git repository.

cmorris pushed a commit to branch splitroles-blockchain
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-dta.git

commit 2d8827c2b2dc4128ee2a1a04a2182bca61cb9937
Author: Christopher Morris <ch...@morris.net>
AuthorDate: Wed Oct 2 08:22:22 2019 +0100

    remove notes
---
 !notes                       | 9 ---------
 pkg/tendermint/websockets.go | 8 ++++----
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/!notes b/!notes
deleted file mode 100644
index 63605f8..0000000
--- a/!notes
+++ /dev/null
@@ -1,9 +0,0 @@
-
-Empty:
-ref=$(curl -s -X POST "127.0.0.1:5556/v1/order1" -H "accept: */*" -H "Content-Type: application/json" -d "{\"beneficiaryIDDocumentCID\":\"\",\"extension\":{\"coin\":\"0\"}}");sleep 4; curl -X POST "127.0.0.1:5556/v1/order/secret1" -H "accept: */*" -H "Content-Type: application/json" -d "{\"orderReference\":$ref,\"beneficiaryIDDocumentCID\":\"QmcyJqEMqNEEYHrNSyUY83CQCNwZ5yVan3SgaQ4NchsqsC\"}"
-
-
-Define at start:
-ref=$(curl -s -X POST "127.0.0.1:5556/v1/order1" -H "accept: */*" -H "Content-Type: application/json" -d "{\"beneficiaryIDDocumentCID\":\"QmcyJqEMqNEEYHrNSyUY83CQCNwZ5yVan3SgaQ4NchsqsC\",\"extension\":{\"coin\":\"0\"}}");sleep 4; curl -X POST "127.0.0.1:5556/v1/order/secret1" -H "accept: */*" -H "Content-Type: application/json" -d "{\"orderReference\":$ref,\"beneficiaryIDDocumentCID\":\"\"}"
-
-
diff --git a/pkg/tendermint/websockets.go b/pkg/tendermint/websockets.go
index 520de51..472ea95 100644
--- a/pkg/tendermint/websockets.go
+++ b/pkg/tendermint/websockets.go
@@ -50,7 +50,7 @@ func subscribeAndQueue(queueWaiting chan api.BlockChainTX, logger *logger.Logger
 	logger.Info("Tendermint: Connected")
 
 	quit := make(chan os.Signal, 1)
-	signal.Notify(quit, os.Interrupt, syscall.SIGTERM)
+	signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
 	for {
 		select {
 		case result := <-out:
@@ -170,9 +170,9 @@ func processTXQueue(svc service.Service, queue chan api.BlockChainTX, listenPort
 }
 
 //Subscribe - Connect to the Tendermint websocket to collect events
-func Subscribe(svc service.Service, store *datastore.Store, logger *logger.Logger, nodeID string, listenPort string, blockchainNode string) error {
+func Subscribe(svc service.Service, store *datastore.Store, logger *logger.Logger, nodeID string, listenPort string) error {
 
-	latestStatus, _ := getChainStatus(blockchainNode)
+	latestStatus, _ := getChainStatus(node)
 	currentBlockHeight, err := strconv.Atoi(latestStatus.Result.SyncInfo.LatestBlockHeight)
 
 	if err != nil {
@@ -187,7 +187,7 @@ func Subscribe(svc service.Service, store *datastore.Store, logger *logger.Logge
 	queueWaiting := make(chan api.BlockChainTX, 1000)
 
 	//while we are processessing the history save all new transactions in a queue for later
-	go subscribeAndQueue(queueWaiting, logger, nodeID, listenPort, blockchainNode)
+	go subscribeAndQueue(queueWaiting, logger, nodeID, listenPort, node)
 	loadAllHistoricTX(processedToHeight, currentBlockHeight, txHistory, nodeID, listenPort)
 	processTXQueue(svc, queueWaiting, listenPort)
 	return nil