diff --git a/lib/jsonrpc/handler.go b/lib/jsonrpc/handler.go index c24b3a470..7f0573f7a 100644 --- a/lib/jsonrpc/handler.go +++ b/lib/jsonrpc/handler.go @@ -212,6 +212,7 @@ func (h handlers) handle(ctx context.Context, req request, w func(func(io.Writer if handler.errOut != -1 { err := callResult[handler.errOut].Interface() if err != nil { + log.Warnf("error in RPC call: %s", err) resp.Error = &respError{ Code: 1, Message: err.(error).Error(), @@ -232,7 +233,7 @@ func (h handlers) handle(ctx context.Context, req request, w func(func(io.Writer } if err := json.NewEncoder(w).Encode(resp); err != nil { - fmt.Println(err) + log.Error(err) return } }) diff --git a/lib/jsonrpc/server.go b/lib/jsonrpc/server.go index 4468c53c4..e3481c03c 100644 --- a/lib/jsonrpc/server.go +++ b/lib/jsonrpc/server.go @@ -73,6 +73,7 @@ func (s *RPCServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { } func rpcError(wf func(func(io.Writer)), req *request, code int, err error) { + log.Errorf("RPC Error: %s", err) wf(func(w io.Writer) { if hw, ok := w.(http.ResponseWriter); ok { hw.WriteHeader(500) diff --git a/lotuspond/front/src/App.css b/lotuspond/front/src/App.css index 5129c934b..6c8aa36e1 100644 --- a/lotuspond/front/src/App.css +++ b/lotuspond/front/src/App.css @@ -28,6 +28,14 @@ display: inline-block; } +.Block { + background: #f9be77; + user-select: text; + font-family: monospace; + min-width: 40em; + display: inline-block; +} + .CristalScroll { display: flex; min-width: 100%; diff --git a/lotuspond/front/src/Block.js b/lotuspond/front/src/Block.js index a97493bbd..f522bb6bf 100644 --- a/lotuspond/front/src/Block.js +++ b/lotuspond/front/src/Block.js @@ -13,7 +13,9 @@ class Block extends React.Component { async loadHeader() { const header = await this.props.conn.call('Filecoin.ChainGetBlock', [this.props.cid]) - this.setState({header: header}) + const messages = await this.props.conn.call('Filecoin.ChainGetBlockMessages', [this.props.cid]) + console.log(messages) + this.setState({header: header, messages: messages}) } render() { @@ -21,17 +23,28 @@ class Block extends React.Component { if (this.state.header) { let head = this.state.header - content = ( + + + let messages = [ + ...(this.state.messages.BlsMessages.map(m => ({...m, type: 'BLS'}))), + ...(this.state.messages.SecpkMessages.map(m => ({...(m.Message), type: 'Secpk'}))) + ].map(m => (