面料链码中的垫片代表什么?

Sat*_*shi 6 hyperledger-fabric

我在Hyperledger面料链代码样本中看到很多单词"shim"

func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) {
Run Code Online (Sandbox Code Playgroud)

这是从中导入的

import (
    "errors"
    "fmt"

    "github.com/hyperledger/fabric/core/chaincode/shim"
)
Run Code Online (Sandbox Code Playgroud)

垫片的缩写是什么?

小智 10

当涉及在不同接口/组件之间调整软件层时,使用Shim in computing.在Hyperledger Fabric的上下文中,Shim 链代码提供API以访问其状态变量,事务上下文和调用其他链代码.Shim包含用于链代码的通用方法并验证对等方彼此通信.

有关更多信息,您可以检查Chaincode协议规范

  • 链码协议规范的链接不起作用,以下可能是它的替代方案:https://github.com/hyperledger-archives/fabric/blob/master/docs/protocol-spec.md (3认同)