BOXFoundation / boxd

Blockchain for BOX Payout
MIT License
40 stars 10 forks source link

`hash` value in corepb.OutPoint from Rpc push api is invalid #264

Closed wangjunbao2018 closed 5 years ago

wangjunbao2018 commented 5 years ago

hash in Rpc api rpc ListenAndReadNewBlock(ListenBlocksReq) returns (stream BlockDetail) is invalid.

The related protocol in protobuf is :

message OutPoint {
    bytes hash = 1;
    uint32 index =2;
}

In java, the hash's type is ByteString. It can't be covert to String correctly. It seems the hash is encoded in Base64, for example "DKr+VciVUYrJc1Hsw3p9bQ1GIowYOrEwaQX2jXsV318=". Rpc can just return the hash value that is not encoded.

Jerick26 commented 5 years ago

fixed on fea3e6e664bbb729f7eb846528a94200c8c6529c