0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Corda】RPCOpsのコマンドまとめ

Posted at

どーも、のぶこふです。
今回は忘れがちな「Corda RPC Ops」のコマンドを軽くまとめます。

つかうモジュール

使用するモジュールは、おなじみのCordapp-Template-Kotlinです。が、特に関係はありません。各自の

Commands

使用例と実行結果を載せていきます。
詳細については、ドキュメントを参照ください。

networkMapSnapshot

>>> run networkMapSnapshot
- addresses:
  - "localhost:10002"
  legalIdentitiesAndCerts:
  - "O=Notary, L=London, C=GB"
  platformVersion: 5
  serial: 1598245871176
- addresses:
  - "localhost:10008"
  legalIdentitiesAndCerts:
  - "O=PartyB, L=New York, C=US"
  platformVersion: 5
  serial: 1598245870743
- addresses:
  - "localhost:10005"
  legalIdentitiesAndCerts:
  - "O=PartyA, L=London, C=GB"
  platformVersion: 5
  serial: 1598245870336

nodeInfo

>>> run nodeInfo
addresses:
- "localhost:10002"
legalIdentitiesAndCerts:
- "O=Notary, L=London, C=GB"
platformVersion: 5
serial: 1598245871176

notaryIdentities

>>> run notaryIdentities
- "O=Notary, L=London, C=GB"

stateMachinesSnapshot

kill flow を実行するときに使用する。
デッドロックなどにより、止まってしまっているTxの情報が表示される。

// なにも無い場合
>>> run stateMachinesSnapshot
[]

// 該当するTxがある場合
- id: "12345678-1234-1234-1234-123456789012"
  flowLogicClassName: "com.XXX"
  initiator:
    party: "O=XXX, L=XXX, C=XXX"
  ・・・

killFlow

// <StateMachineID>には、上記「stateMachinesSnapshot」で取得したIDを指定する
>>> run killFlow id : <StateMachineID>
true

別Command

flow list

>>> flow list
com.template.flows.IOUFlow
com.template.flows.SendFlow
net.corda.core.flows.ContractUpgradeFlow$Authorise
net.corda.core.flows.ContractUpgradeFlow$Deauthorise
net.corda.core.flows.ContractUpgradeFlow$Initiate

おわりに

まだまだコマンドはありますが、一旦、日常的に使いそうなここまで。
ありがとうございました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?