Skip to content

Commit

Permalink
add rpc to check or get illegal evidence
Browse files Browse the repository at this point in the history
  • Loading branch information
RainFallsSilent authored and bocheng0000 committed Mar 14, 2019
1 parent 8e7668e commit 3c39da5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions main.go
Expand Up @@ -236,6 +236,8 @@ func newJsonRpcServer(port uint16, service *sv.HttpServiceExtend) *jsonrpc.Serve
s.RegisterAction("discretemining", service.DiscreteMining, "count")
s.RegisterAction("getidentificationtxbyidandpath", service.GetIdentificationTxByIdAndPath, "id", "path")
s.RegisterAction("listunspent", service.ListUnspent, "addresses")
s.RegisterAction("getillegalevidencebyheight", service.GetIllegalEvidenceByHeight, "height")
s.RegisterAction("checkillegalevidence", service.CheckIllegalEvidence, "evidence")

return s
}
Expand Down
5 changes: 3 additions & 2 deletions mempool/validator.go
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/elastos/Elastos.ELA.SideChain/spv"
"github.com/elastos/Elastos.ELA.SideChain/types"
"github.com/elastos/Elastos.ELA/common"
"github.com/elastos/Elastos.ELA/core/contract"
)

type validator struct {
Expand Down Expand Up @@ -102,8 +103,8 @@ func (v *validator) checkTransactionOutput(txn *types.Transaction) error {
}

func checkOutputProgramHash(programHash common.Uint168) bool {
switch programHash[0] {
case common.PrefixStandard, common.PrefixMultisig, common.PrefixCrossChain,
switch contract.PrefixType(programHash[0]) {
case contract.PrefixStandard, contract.PrefixMultiSig, contract.PrefixCrossChain,
pact.PrefixRegisterId:
return true
}
Expand Down

0 comments on commit 3c39da5

Please sign in to comment.